Last active
April 15, 2020 13:20
-
-
Save bnjbvr/f39bfc41082c3b50cbbb92877cfc7e9f to your computer and use it in GitHub Desktop.
Misc spidermonkey commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. When running configure, pass the `--enable-perf` configuration option. Re-build the shell. | |
2. Run the shell with | |
``` | |
IONPERF=func perf record $jsshell --no-wasm-multi-value --shared-memory=off --wasm-compiler=cranelift /path/to/script.js | |
``` | |
An ExecutableAllocator is leaked on shutdown, which causes an assertion to | |
trigger: `Assertion failure: m_refCount == 1, at /home/ben/code/mozilla-inbound/js/src/jit/ExecutableAllocator.cpp:51` | |
3. Perf mapping should be generated in /tmp as `perf-$PID.map`, and a `perf.data` file should have | |
been generated in the current working directory. It can then be inspected with `perf report`, or | |
[HotSpot](https://github.com/KDAB/hotspot/), etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Use a build with debug enabled (`--enable-debug`) or jit spew enabled (`--enable-jitspew`). | |
2. Run with `IONFLAGS=logs $jsshell /path/to/script > /tmp/logs 2>&1`. This generates a large log, | |
since it contains generated JIT code for JS too. | |
3. Open /tmp/logs and grep "wasm cranelift". You'll see `Start of wasm cranelift code for function | |
...`, and there's also something at the end of the wasm cranelift code for the given function. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment