Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Injecting Arbitrary wat code #136

Open
ejrgilbert opened this issue Aug 21, 2024 · 0 comments
Open

Support Injecting Arbitrary wat code #136

ejrgilbert opened this issue Aug 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ejrgilbert
Copy link
Owner

Justification

It may be easier for the user to express their instrumentation by directly writing wat code.

Example

wasm:opcode:if:before {
    wat {
        i32.const 0
        drop
    }
}

Further Ideas

What if we expanded this to enable writing a script for postprocessing inside the whamm script itself, e.g.:

END {
    // (The END will need to feed some data into python that can be post-processed (e.g. report vars, CSV file, etc.))
    //  ||  ||  ||
    //  V V V
    python {
        // Python script to perform the postprocessing steps
        ......
    }
}

The output of whamm would be:

  1. app.mon.wasm: the instrumented wasm module
  2. app.mon.py: the python script referenced in the END
  3. run.bash OR Makefile: A file that runs app.mon.wasm and then calls app.mon.py with the relevant data as args
@ejrgilbert ejrgilbert added the enhancement New feature or request label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant