WebAssembly / WebAssembly/wabt

wasm-stats: support markov chain style listings

Open
#2,312 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
8.1k
Forks
827
Avg merge
4d 6h
Merged PRs (30d)
18

Description

The wasm-stats tool outputs opcode counts for a wasm file. It would be really helpful if it could also build a markov chain from the opcodes in a wasm file, or the probability that a given opcode is followed by any other opcodes. As we now know, inlining isn't actually helpful with wasm, and such markov chains would help with analyzing areas of excessive inlining in wasm modules.

Might implement this ourselves... at some point. Been busy. If anyone else wants to work on it, do let us know so we can avoid duplicate work.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the wasm-stats tool but no source file or test. Start by locating its implementation and opcode-counting path, then determine how a Markov-chain listing and its probabilities should be represented; done means wasm-stats can produce that analysis for a WebAssembly file.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.