[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 <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61840}
This commit is contained in:
Clemens Hammacher 2019-05-27 11:12:26 +02:00 committed by Commit Bot
parent bfc6ec999f
commit 7dbbd9356b
2 changed files with 4 additions and 2 deletions

View File

@ -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_);
}

View File

@ -740,6 +740,7 @@ void WasmEngine::SampleTopTierCodeSizeInAllIsolates(
void WasmEngine::ReportLiveCodeForGC(Isolate* isolate,
Vector<WasmCode*> 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;