Add IONPERF=ir-graph for dumping iongraph.json to perf JitDump
Categories
(Core :: JavaScript Engine: JIT, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox144 | --- | fixed |
People
(Reporter: rhunt, Assigned: rhunt)
References
(Blocks 2 open bugs)
Details
Attachments
(6 files, 4 obsolete files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
We'd like to integrate Ben's iongraph-web visualizer into the profiler. To do this, we'll need to dump the JSON for each function into the perf JitDump file.
| Assignee | ||
Comment 1•9 months ago
|
||
GraphSpewer delegates all of the graph spewing to JSONSpewer,
and only really exists to dump the result to JITSpew.
JSONSpewer is what actually prints the graph JSON and is what
I need to use for dumping to the JitDump stream.
Rename GraphSpewer -> JitSpewGraphSpewer, and
JSONSpewer -> GraphSpewer.
| Assignee | ||
Comment 2•9 months ago
|
||
This is not used at all and seems to be an artifact of
the IonPerfSpewer support added to wasm.
| Assignee | ||
Comment 3•9 months ago
|
||
PerfSpewer entagles two separate concepts:
- The JitDump debug entries that map from PC -> line/column
- The IR opcodes we generate when IONPERF=ir that are printed
to a temp file and linked to from the debug entries.
This is a problem when trying to support printing the iongraph.json
to jitdump, as we don't want to use the IR opcode feature of PerfSpewer
but we do want to have debug entries that reference the JSON.
This commit refactors PerfSpewer so that it only holds a collection
of debug entries that will be written into JitDump later. The IR
file is now opened eagerly when we begin recording, and all writes
to the file also add to the debug entries vector.
This split makes IONPERF=src cleaner, as it only needs to add
debug entries. This will also simplify iongraph integration as
we can now just have the GraphSpewer write directly into the
file and avoid an extra buffer.
BaselineInterpreterPerfSpewer keeps a version of the Op struct
as it makes a late decision about whether to generate multiple
JitDump entries or just a single one for the loop, and it's
easiest to just have the IR in memory for this.
| Assignee | ||
Comment 4•9 months ago
|
||
As far as I can tell, this static boolean isn't used in any way.
| Assignee | ||
Comment 5•9 months ago
|
||
GraphSpewer delegates all of the graph spewing to JSONSpewer,
and only really exists to dump the result to JITSpew.
JSONSpewer is what actually prints the graph JSON and is what
I need to use for dumping to the JitDump stream.
Rename GraphSpewer -> JitSpewGraphSpewer, and
JSONSpewer -> GraphSpewer.
| Assignee | ||
Comment 6•9 months ago
|
||
This is not used at all and seems to be an artifact of
the IonPerfSpewer support added to wasm.
| Assignee | ||
Comment 7•9 months ago
|
||
PerfSpewer entagles two separate concepts:
- The JitDump debug entries that map from PC -> line/column
- The IR opcodes we generate when IONPERF=ir that are printed
to a temp file and linked to from the debug entries.
This is a problem when trying to support printing the iongraph.json
to jitdump, as we don't want to use the IR opcode feature of PerfSpewer
but we do want to have debug entries that reference the JSON.
This commit refactors PerfSpewer so that it only holds a collection
of debug entries that will be written into JitDump later. The IR
file is now opened eagerly when we begin recording, and all writes
to the file also add to the debug entries vector.
This split makes IONPERF=src cleaner, as it only needs to add
debug entries. This will also simplify iongraph integration as
we can now just have the GraphSpewer write directly into the
file and avoid an extra buffer.
BaselineInterpreterPerfSpewer keeps a version of the Op struct
as it makes a late decision about whether to generate multiple
JitDump entries or just a single one for the loop, and it's
easiest to just have the IR in memory for this.
| Assignee | ||
Comment 8•9 months ago
|
||
As far as I can tell, this static boolean isn't used in any way.
| Assignee | ||
Comment 9•9 months ago
|
||
If IONPERF=ir-graph, IonPerfSpewer will now dump the iongraph.json
into a temporary file, and link to it from debug entries in JitDump.
Instead of mapping a PC to a line/column, we map it to LIR node ID's
so that the graph visualizer can use this to display sample counts.
IonPerfSpewer is moved from CodeGenerator to MIRGenerator and
lives next to JitSpewGraphSpewer. Methods are added to spew
passes to both of these. The JitSpew StartFunction/EndFunction
methods are also moved to MIRGenerator.
| Assignee | ||
Comment 10•9 months ago
|
||
iongraph-web needs loopDepth information. Indentation also consumes
a ton of space and is not necessary, disable it.
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Comment 11•9 months ago
|
||
Comment 12•9 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f875152176bb
https://hg.mozilla.org/mozilla-central/rev/4d1a98649d31
https://hg.mozilla.org/mozilla-central/rev/c5f54b1b749c
https://hg.mozilla.org/mozilla-central/rev/b7504bd59ede
https://hg.mozilla.org/mozilla-central/rev/dbb0c668af41
https://hg.mozilla.org/mozilla-central/rev/854e68ddff18
https://hg.mozilla.org/mozilla-central/rev/e8d0a6f755ae
Updated•9 months ago
|
Description
•