Commit e19b3778 authored by jing.bao's avatar jing.bao Committed by Commit Bot

Fix vtune logging for WASM

Vtune logging for WASM can't work after
https://chromium-review.googlesource.com/c/v8/v8/+/1602700.
This CL adds detection for logger()->is_listening_to_code_events() which is true
with jit_logger_ set under ENABLE_VTUNE_JIT_INTERFACE, because
code_event_dispatcher()->IsListeningToCodeEvents() remains false with
jit_logger_.
Contributed by yolanda.chen@intel.com

Change-Id: I1e6e67345ffbbe30fbf5faa0e344c34e606ec81f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692484Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#62620}
parent 22699132
......@@ -150,7 +150,8 @@ bool WasmCode::ShouldBeLogged(Isolate* isolate) {
// The return value is cached in {WasmEngine::IsolateData::log_codes}. Ensure
// to call {WasmEngine::EnableCodeLogging} if this return value would change
// for any isolate. Otherwise we might lose code events.
return isolate->code_event_dispatcher()->IsListeningToCodeEvents() ||
return isolate->logger()->is_listening_to_code_events() ||
isolate->code_event_dispatcher()->IsListeningToCodeEvents() ||
isolate->is_profiling();
}
......
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