Commit 18a87b4f authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by V8 LUCI CQ

[profiler] Populate script line ends for native stacks

When profiling V8 code generated with snapshot using ETW, there is a
huge difference enabling system instrumentation. This is because, for
populating the ETW tracing (when --interpreted-frames-native-stack is
enabled), we need the scripts line ends. But these are only generated if
log functions are enabled.

To prevent the problem, this CL also initializes script line ends for
the case interpreted frames native stacks are enabled.

Bug: v8:12910
Change-Id: I89eab727574a68a8b2fbc2575faf540218370e7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669698Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81098}
parent 79db56f1
......@@ -310,6 +310,7 @@ void CreateInterpreterDataForDeserializedCode(Isolate* isolate,
if (!log_code_creation) continue;
Handle<AbstractCode> abstract_code = Handle<AbstractCode>::cast(code);
Script::InitLineEnds(isolate, script);
int line_num = script->GetLineNumber(info->StartPosition()) + 1;
int column_num = script->GetColumnNumber(info->StartPosition()) + 1;
PROFILE(isolate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment