Uh oh!
There was an error while loading. Please reload this page.
[v24.x] deps: V8: backport d259a9e2ead7 - #63865
Merged
aduh95 merged 1 commit intoAug 19, 2026
Merged
Conversation
nodejs-github-bot
commented
Jun 12, 2026
Collaborator
Review requested:
|
aduh95force-pushed
the
maglev-srcpos-backport
branch
from
August 13, 2026 09:25
6159ef6 to
f437facComparenodejs-github-bot
commented
Aug 13, 2026
Collaborator
nodejs-github-bot
commented
Aug 13, 2026
Collaborator
nodejs-github-bot
commented
Aug 13, 2026
Collaborator
aduh95
commented
Aug 13, 2026
Contributor
@nodejs/v8 no objections for this backport? |
aduh95
approved these changes
Aug 19, 2026
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: nodejs#63816 PR-URL: nodejs#63865 Co-authored-by: Guillaume Lagrange <guillaume@codspeed.io> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
aduh95force-pushed
the
maglev-srcpos-backport
branch
from
August 19, 2026 09:33
f437fac to
82a0233Compareaduh95
commented
Aug 19, 2026
Contributor
Landed in 82a0233 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports v8/v8@d259a9e to the V8 13.6 tree.
Changes only impact when running with profiling enabled.
Fixes: #63816
Adaptation
One deviation from a straight cherry-pick: upstream adds
collect_source_positions()to a single graph-labeller condition inMaglevCompiler::Compile. The 13.6 tree builds the labeller in a differently shaped block, so the condition is added separately. Noted inline.Profiling with samply
Before this change, Maglev (
+) frames resolve to a function name with no line detail. After, samples inside Maglev code map to their source lines and the inlined functions they came from.Example
loop.js
When running this script, here's the before and after flamegraphs recorded with samply for convenience, but similar results can be achieved with perf + folding scripts.
Before
After