Tidy up debug output with IONFLAGS=, especially IONFLAGS=all
Categories
(Core :: JavaScript Engine: JIT, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
Details
Attachments
(1 file)
Output with IONFLAGS=all
is valuable for debugging the various JITs, but is
inconsistent and poorly sectioned, at least for the output generated when the
input is wasm and the selected compiler is Ion. This patch makes some
improvements. There is no functional change for non-debug builds. The
changes make it easier to navigate through large amounts of debug output.
Assignee | ||
Comment 1•4 years ago
|
||
Output with IONFLAGS=all
is valuable for debugging the various JITs, but is
inconsistent and poorly sectioned, at least for the output generated when the
input is wasm and the selected compiler is Ion. This patch makes some
improvements. There is no functional change for non-debug builds. The
changes make it easier to navigate through large amounts of debug output.
Changes are:
-
For debug printing caused by MIR optimisation (meaning, as driven by
OptimizeMIR()
), by the code generator, and by the register allocator:
route all output by the officialJitSpew
family of calls, instead of an
ad-hoc mixture ofJitSpew
calls and lower levelprintf
s. This causes
all such output to be properly prefixed with a[SomePass]
style marker.
Most of these changes are in the register allocator. -
For the debug printing caused by
OptimizeMIR()
:-
print a blank line before the output of each pass, so as to make it easier
to identify the start and end of debug output for each pass. No blank
line is emitted for passes which don't create debug output (meaning, which
don't have their ownJitSpew_SomePass
selector. -
Ensure that every pass which is run, that can emit debug output and which
is enabled by theIONFLAGS=
setting, does actually print at least one
line, even if it is just a[SomePass] Begin
message, so we can know that
the pass actually ran. Without this, it's impossible to differentiate the
cases "pass ran, but produced no debug output" from "pass didn't run",
when reading debug output. -
for the debug printing for the Range analysis pass, add some missing
newlines. -
In various places, add a bit of indentation so as to clarify the logical
nesting structure of the debug output.
-
-
In the register allocator, fine-tune the placement of blank lines so as to
clarify the start/end of sub-phases, and convert many ad-hocout.printf
calls to officialJitSpew
calls. -
In
wasm::IonCompileFunctions()
, make the function start/end logging lines
much longer, so as to make it easier to find them in large log files. -
js/src/jit/JitSpewer.h: new entry
WasmBCE
, for wasm bounds-check
elimination logging.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
bugherder |
Description
•