Commit e9c6897b authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[RuntimeStats] Ensure that top-level API calls track runtime call stat events.

Previously the ScriptCompiler event for compiling streaming sources
was not attaching the runtime trace events to the trace event, which
meant the runtime call stats for these were being lost.

Perf Sheriffs: This is likely to cause perf regressions in v8.runtime_stats
benchmarks because it will start attributing additional events we were
losing before.

BUG=v8:5203

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I0ef9a10951dc976fb0415ae7b5a91c16e1968ae5
Reviewed-on: https://chromium-review.googlesource.com/786551Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49600}
parent fff10129
......@@ -2457,7 +2457,7 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
Local<Object> context_extensions[]) {
PREPARE_FOR_EXECUTION(v8_context, ScriptCompiler, CompileFunctionInContext,
Function);
TRACE_EVENT0("v8", "V8.ScriptCompiler");
TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
i::Handle<i::String> source_string;
auto factory = isolate->factory();
if (arguments_count) {
......@@ -2582,7 +2582,7 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
Local<String> full_source_string,
const ScriptOrigin& origin) {
PREPARE_FOR_EXECUTION(context, ScriptCompiler, Compile, Script);
TRACE_EVENT0("v8", "V8.ScriptCompiler");
TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
i::StreamedSource* source = v8_source->impl();
i::Handle<i::String> str = Utils::OpenHandle(*(full_source_string));
i::Handle<i::Script> script = isolate->factory()->NewScript(str);
......
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