Commit 04f07852 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Add two more trace events

{AsyncCompileJob::FinishCompile} sometimes takes a long time, especially
if DevTools is open. A lot of time can be spent making the script(s)
available to DevTools, or executing the {CompilationResultResolver}.
This CL adds new trace scopes around these two sections to make this
visible in the trace.

R=mstarzinger@chromium.org

Change-Id: Ia97f43e493dfb9ea5468710b877ec9ea8a0714b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1889881Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64675}
parent d9e37a84
......@@ -1537,7 +1537,10 @@ void AsyncCompileJob::FinishCompile() {
AllocationType::kOld);
script->set_source_mapping_url(*src_map_str.ToHandleChecked());
}
isolate_->debug()->OnAfterCompile(script);
{
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "Debug::OnAfterCompile");
isolate_->debug()->OnAfterCompile(script);
}
auto compilation_state =
Impl(module_object_->native_module()->compilation_state());
......@@ -1579,6 +1582,8 @@ void AsyncCompileJob::AsyncCompileFailed() {
}
void AsyncCompileJob::AsyncCompileSucceeded(Handle<WasmModuleObject> result) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"),
"CompilationResultResolver::OnCompilationSucceeded");
resolver_->OnCompilationSucceeded(result);
}
......
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