You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original commit message:
[maglev] Add source position collection
This change adds support for collecting source positions in Maglev for
profiling. It wires a SourcePositionTableBuilder through the code
generator and uses the existing source positions from the graph
labeller.
Fixed: 436575053
Change-Id: I64fa1e8829b036e498fa1d756c996716d16fb2a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6897146
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#102119}
Before this change Maglev attached an empty source position table to its
generated Code objects (set_empty_source_position_table()). As a result,
when profiling with `--perf-prof --interpreted-frames-native-stack`
(linux perf / samply), Maglev-optimized frames carried no line/inlining
information in the jitdump, so inlined call chains were lost in the
resulting flamegraphs (baseline and TurboFan code were unaffected). This
backport restores per-pc source positions for Maglev code, matching V8
>= 15.x and newer Node.js.
The change is gated on collect_source_positions() (enabled by
--detailed-line-info / profiling); the steady-state generated machine
code is unchanged and there is no extra cost when not profiling.
Adaptations for V8 13.6 (node): the graph-labeller creation in
MaglevCompiler::Compile is added as a separate condition because node's
13.6 tree creates the labeller in a differently-shaped block than
upstream; the rest is a direct cherry-pick.
Refs: v8/v8@d259a9eFixes: #63816
0 commit comments