Triggered by this blog post about -fsave-optimization-record
, and Max Bernstein asking about it, and then pointing out this neat front end to the data, I figured I'd see what it said for SpiderMonkey.
Here's my my procedure:
First I created a new mozconfig
. The most important part being
ac_add_options --enable-application=js
ac_add_options --enable-optimize
ac_add_options --disable-debug
export CFLAGS="$CFLAGS -fsave-optimization-record"
export CXXFLAGS="$CXXFLAGS -fsave-optimization-record"
Then I built SpiderMonkey. Then I asked OptView2 to generate my results for the JS directory:
./optview2/opt-viewer.py --output-dir js --source-dir ~/unified/ ~/unified/obj-opt-shell-nodebug-opt-recordx86_64-pc-linux-gnu/ -j10
After waiting a bit, it filled a directory with HTML files. I've uploaded them to GitHub, and published on GitHub Pages.
It certainly seems like this has interesting information! But there's a ton to go through, so for now just posting this blog post so people can reproduce my method. The OptView2 index isn't amazing either, so it's worth looking at specific files too.