INFORMATION AND HELP PAGE FOR CACHEIR HEALTH REPORT TOOL
HOW TO GENERATE AND USE A HEALTH REPORT:
- Add the below line to your mozconfig to support CacheIR Health Report:
- Use environment variable: SPEW=CacheIRHealthReport.
note: The SPEW environment variable is not used in optimized browser builds, enabling jitspew allows generating a report in optimized builds.
- There are four ways to generate a CacheIR Health Report:
The health report will be named "spew_output.[PID].0", unless otherwise specified, and will be in the same directory you ran the browser or shell from.
Go to CacheIR Health Report and input the file from the previous step into the tool.
- Build and run the browser with the two aforementioned evironment and mozconfig
note: for this option you must set security.sandbox.content.level to 1 in about:config
SPEW=CacheIRHealthReport ./mach run
- Running a JS program will produce a health report.
SPEW=CacheIRHealthReport dist/bin/js jsprogram.js
- In the shell you can call cacheIRHealthReport() and a report will be generated for all scripts in the current zone.
- You may also call cacheIRHealthReport() on a particular function to see the health report associated with that function's script.
- To reduce the size of spewed data, IONFILTER is an environment variable you may use to select specific functions or filenames. This may be helpful when a website you would like to see a report for is producing very large spew output files.
WHY IS THIS SCRIPT UNHAPPY?:
There are a few reasons why your script is unhappy:
- A CacheIR stub was created for a JS_Op has a sum of costs for each of the CacheIROps in that stub that is very high.
- More than one non-zero hit count stub was attached to the inline cache. This is costly because we will not Warp-transpile these stubs.
- An inline cache entry is either megamorphic or generic.
WHAT IS THE SPEWING CONTEXT?:
There are a few ways contexts that we spew health reports:
- Shell - The cacheIRHealthReport shell function was called.
- Transition - The inline cache transitioned into either megamorphic or generic mode.
- Trial Inlining - The trial inlining hit count threshold of 500 was reached.
Motivation and Description of CacheIR Health Report
How we decide scoring for particular CacheIROps
How to specify a different spew file for the health report