Commit c7ec5bf4 authored by kschimpf's avatar kschimpf Committed by Commit bot

Separate module instantiate counter for asm and wasm.

Currently, v8 uses the same flag to collect time for instantiating wasm modules
from js asm and wasm. This separates the v8 counter into two separate counters,
and then uses the appropriate counter when instantiating a module.

BUG=chromium:704922
R=aseemgarg@chromium.org,bradnelson@chromium.org,bbudge@chromium.org

Review-Url: https://codereview.chromium.org/2772773004
Cr-Commit-Position: refs/heads/master@{#44122}
parent c72c90bc
......@@ -957,7 +957,10 @@ class RuntimeCallTimerScope {
/* Total JavaScript execution time (including callbacks and runtime calls */ \
HT(execute, V8.Execute, 1000000, MICROSECOND) \
/* Asm/Wasm */ \
HT(wasm_instantiate_module_time, V8.WasmInstantiateModuleMicroSeconds, \
/* TODO(karlschimpf) Update chrome flags to reflect asm/wasm split. */ \
HT(wasm_instantiate_asm_module_time, V8.WasmInstantiateModuleMicroSeconds, \
1000000, MICROSECOND) \
HT(wasm_instantiate_wasm_module_time, V8.WasmInstantiateModuleMicroSeconds, \
1000000, MICROSECOND) \
HT(wasm_decode_module_time, V8.WasmDecodeModuleMicroSeconds, 1000000, \
MICROSECOND) \
......
......@@ -1153,8 +1153,11 @@ class InstantiationHelper {
return {};
}
// Record build time into correct bucket, then build instance.
HistogramTimerScope wasm_instantiate_module_time_scope(
isolate_->counters()->wasm_instantiate_module_time());
module_->origin == ModuleOrigin::kWasmOrigin
? isolate_->counters()->wasm_instantiate_wasm_module_time()
: isolate_->counters()->wasm_instantiate_asm_module_time());
Factory* factory = isolate_->factory();
//--------------------------------------------------------------------------
......
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