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}
This commit is contained in:
kschimpf 2017-03-24 11:46:55 -07:00 committed by Commit bot
parent c72c90bc74
commit c7ec5bf414
2 changed files with 8 additions and 2 deletions

View File

@ -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) \

View File

@ -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();
//--------------------------------------------------------------------------