Commit 2cc0eed9 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Add some more data to tracing

This adds some arguments to trace events to better see whether large
times spent in these events are reasonable.

R=mstarzinger@chromium.org

Change-Id: I6097d988875d4911aff9741a1ed16590a442f60b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1886912Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64614}
parent 87cc506c
...@@ -1036,7 +1036,8 @@ bool ExecuteCompilationUnits( ...@@ -1036,7 +1036,8 @@ bool ExecuteCompilationUnits(
auto publish_results = [&results_to_publish]( auto publish_results = [&results_to_publish](
BackgroundCompileScope* compile_scope) { BackgroundCompileScope* compile_scope) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "PublishResults"); TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "PublishResults",
"num_results", uint64_t{results_to_publish.size()});
if (results_to_publish.empty()) return; if (results_to_publish.empty()) return;
WasmCodeRefScope code_ref_scope; WasmCodeRefScope code_ref_scope;
std::vector<WasmCode*> code_vector = std::vector<WasmCode*> code_vector =
...@@ -2329,8 +2330,8 @@ void CompilationStateImpl::FinalizeJSToWasmWrappers( ...@@ -2329,8 +2330,8 @@ void CompilationStateImpl::FinalizeJSToWasmWrappers(
// TODO(6792): Wrappers below are allocated with {Factory::NewCode}. As an // TODO(6792): Wrappers below are allocated with {Factory::NewCode}. As an
// optimization we keep the code space unlocked to avoid repeated unlocking // optimization we keep the code space unlocked to avoid repeated unlocking
// because many such wrapper are allocated in sequence below. // because many such wrapper are allocated in sequence below.
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "FinalizeJSToWasmWrappers",
"FinalizeJSToWasmWrappers"); "num_wrappers", uint64_t{js_to_wasm_wrapper_units_.size()});
CodeSpaceMemoryModificationScope modification_scope(isolate->heap()); CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
for (auto& unit : js_to_wasm_wrapper_units_) { for (auto& unit : js_to_wasm_wrapper_units_) {
Handle<Code> code = unit->Finalize(isolate); Handle<Code> code = unit->Finalize(isolate);
...@@ -2348,7 +2349,8 @@ CompilationStateImpl::GetNextCompilationUnit( ...@@ -2348,7 +2349,8 @@ CompilationStateImpl::GetNextCompilationUnit(
} }
void CompilationStateImpl::OnFinishedUnits(Vector<WasmCode*> code_vector) { void CompilationStateImpl::OnFinishedUnits(Vector<WasmCode*> code_vector) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "OnFinishedUnits"); TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "OnFinishedUnits",
"num_units", uint64_t{code_vector.size()});
base::MutexGuard guard(&callbacks_mutex_); base::MutexGuard guard(&callbacks_mutex_);
......
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