While working on V8 log processing, I discovered several issues originating from how the V8 logger generates logs. This umbrella issue aims to track known problems, related V8 issues, their current status, and any known workarounds.
These issues affect the accuracy and completeness of profiling data extracted from V8 logs, which in turn impacts tooling like CPUpro. Maintaining this list helps monitor progress on upstream fixes and provides guidance for users who may encounter these problems.
1. Position table missing for Sparkplug codes
- V8 issue: 436536715
- Details:
There’s a comment in the V8 logger code noting that this needs to be fixed (if I get it right), but it appears to have been overlooked.
- Impact:
- Execution time (self and nested) is attributed to the function (its "header") rather than specific locations within the function's source code.
- Workaround:
A patch (for the latest Node.js 24, but the changes should work for V8 itself as well) inspired by V8 CPU Profiler resolves this issue. Until an official fix is made in V8, a custom V8/Node.js/Chromium build is required to apply the patch.
2. Position table and inline information missing for Maglev codes
- V8 issue: 436575053
- Details:
V8 currently doesn’t generate a position table for Maglev code, so there is no simple solution. Since Maglev is the newest compiler in V8, it’s reasonable to assume this is simply unfinished work rather than an intentional omission.
- Impact:
- Execution time (self and nested) is attributed to the function (its "header") rather than specific locations within the function's source code.
- Call stacks for inlined code cannot be reconstructed. Since Maglev performs inlining (like Turbofan), time spent in inlined functions is attributed to the function they inlined into.
- Locations of deoptimizations within inlined code cannot be correctly resolved. While Maglev deoptimization records contain an
inlinedId, the hierarchy of inlined functions is missing.
- Workaround:
Disable Maglev by passing --no-maglev to V8. While this changes the optimization tier and thus the profile itself, it enables accurate and complete logging. Some optimizations and deoptimization causes overlap with Turbofan, so this workaround can provide an acceptable approximation in some cases.
3. Incomplete call stacks
There are several issues related to incomplete stack:
All the details in the document: V8 profiling issues: Call stack capturing
While working on V8 log processing, I discovered several issues originating from how the V8 logger generates logs. This umbrella issue aims to track known problems, related V8 issues, their current status, and any known workarounds.
These issues affect the accuracy and completeness of profiling data extracted from V8 logs, which in turn impacts tooling like CPUpro. Maintaining this list helps monitor progress on upstream fixes and provides guidance for users who may encounter these problems.
1. Position table missing for Sparkplug codes
There’s a comment in the V8 logger code noting that this needs to be fixed (if I get it right), but it appears to have been overlooked.
A patch (for the latest Node.js 24, but the changes should work for V8 itself as well) inspired by V8 CPU Profiler resolves this issue. Until an official fix is made in V8, a custom V8/Node.js/Chromium build is required to apply the patch.
2. Position table and inline information missing for Maglev codes
V8 currently doesn’t generate a position table for Maglev code, so there is no simple solution. Since Maglev is the newest compiler in V8, it’s reasonable to assume this is simply unfinished work rather than an intentional omission.
inlinedId, the hierarchy of inlined functions is missing.Disable Maglev by passing
--no-maglevto V8. While this changes the optimization tier and thus the profile itself, it enables accurate and complete logging. Some optimizations and deoptimization causes overlap with Turbofan, so this workaround can provide an acceptable approximation in some cases.3. Incomplete call stacks
There are several issues related to incomplete stack:
All the details in the document: V8 profiling issues: Call stack capturing