Commit 9a13c49f authored by Andreas Haas's avatar Andreas Haas Committed by V8 LUCI CQ

[wasm] Add trace event for Liftoff compilation after caching

With dynamic tiering, not all functions get compiled with TurboFan,
and not all functions can therefore get cached. With this metric we
want to keep track of the time needed to compile missing functions with
Liftoff.

R=jkummerow@chromium.org

Bug: v8:12281
Change-Id: I1f2de3e1f6b004477985df5d2116f69371528c3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289178Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78020}
parent 226995ae
......@@ -135,7 +135,9 @@ namespace internal {
HT(snapshot_decompress, V8.SnapshotDecompress, 10000000, MICROSECOND) \
/* Time to decompress context snapshot. */ \
HT(context_snapshot_decompress, V8.ContextSnapshotDecompress, 10000000, \
MICROSECOND)
MICROSECOND) \
HT(wasm_compile_after_deserialize, V8.WasmCompileAfterDeserialize, 1000000, \
MILLISECOND)
#define NESTED_TIMED_HISTOGRAM_LIST_SLOW(HT) \
/* Total V8 time (including JS and runtime calls, exluding callbacks) */ \
......
......@@ -3185,6 +3185,11 @@ void CompilationStateImpl::AddCompilationUnit(CompilationUnitBuilder* builder,
void CompilationStateImpl::InitializeCompilationProgressAfterDeserialization(
base::Vector<const int> missing_functions) {
TRACE_EVENT1("v8.wasm", "wasm.CompilationAfterDeserialization",
"num_missing_functions", missing_functions.size());
TimedHistogramScope lazy_compile_time_scope(
counters()->wasm_compile_after_deserialize());
auto* module = native_module_->module();
auto enabled_features = native_module_->enabled_features();
const bool lazy_module = IsLazyModule(module);
......
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