From 7dbbd9356b81101be8dacd3665f3d24f00890b0f Mon Sep 17 00:00:00 2001 From: Clemens Hammacher Date: Mon, 27 May 2019 11:12:26 +0200 Subject: [PATCH] [wasm][gc] Fix category in trace events and add more The category for wasm trace events is "disabled-by-default-v8.wasm", generated by {TRACE_DISABLED_BY_DEFAULT("v8.wasm")}. This CL fixes two events that used the category without the "disabled-by-default-" prefix, and adds two more trace events to make code GC more visible in the trace. R=mstarzinger@chromium.org Bug: v8:8217 Change-Id: Ib20d9caec9e55013acbeb604f91a63e8a557f30c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627982 Commit-Queue: Clemens Hammacher Reviewed-by: Michael Starzinger Cr-Commit-Position: refs/heads/master@{#61840} --- src/execution/execution.cc | 4 ++-- src/wasm/wasm-engine.cc | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/execution/execution.cc b/src/execution/execution.cc index 1ea977c4d5..8412be80da 100644 --- a/src/execution/execution.cc +++ b/src/execution/execution.cc @@ -647,12 +647,12 @@ Object StackGuard::HandleInterrupts() { } if (CheckAndClearInterrupt(LOG_WASM_CODE)) { - TRACE_EVENT0("v8.wasm", "LogCode"); + TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "LogCode"); isolate_->wasm_engine()->LogOutstandingCodesForIsolate(isolate_); } if (CheckAndClearInterrupt(WASM_CODE_GC)) { - TRACE_EVENT0("v8.wasm", "WasmCodeGC"); + TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "WasmCodeGC"); isolate_->wasm_engine()->ReportLiveCodeFromStackForGC(isolate_); } diff --git a/src/wasm/wasm-engine.cc b/src/wasm/wasm-engine.cc index d2f3c54738..f70db21f77 100644 --- a/src/wasm/wasm-engine.cc +++ b/src/wasm/wasm-engine.cc @@ -740,6 +740,7 @@ void WasmEngine::SampleTopTierCodeSizeInAllIsolates( void WasmEngine::ReportLiveCodeForGC(Isolate* isolate, Vector live_code) { + TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "ReportLiveCodeForGC"); TRACE_CODE_GC("Isolate %d reporting %zu live code objects.\n", isolate->id(), live_code.size()); base::MutexGuard guard(&mutex_); @@ -810,6 +811,7 @@ void WasmEngine::FreeDeadCode(const DeadCodeMap& dead_code) { } void WasmEngine::FreeDeadCodeLocked(const DeadCodeMap& dead_code) { + TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.wasm"), "FreeDeadCode"); DCHECK(!mutex_.TryLock()); for (auto& dead_code_entry : dead_code) { NativeModule* native_module = dead_code_entry.first;