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

Split counters for functions per module for asm and wasm.

Currently, V8 uses the same counter to count both wasm and and asm js. This
splits the counters into two separate counters, and then uses the appropriate
counter when instantiating the module.

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

Review-Url: https://codereview.chromium.org/2777073003
Cr-Commit-Position: refs/heads/master@{#44164}
parent 15247047
......@@ -926,7 +926,8 @@ class RuntimeCallTimerScope {
HR(scavenge_reason, V8.GCScavengeReason, 0, 21, 22) \
HR(young_generation_handling, V8.GCYoungGenerationHandling, 0, 2, 3) \
/* Asm/Wasm. */ \
HR(wasm_functions_per_module, V8.WasmFunctionsPerModule, 1, 10000, 51)
HR(wasm_functions_per_asm_module, V8.WasmFunctionsPerModule, 1, 10000, 51) \
HR(wasm_functions_per_wasm_module, V8.WasmFunctionsPerModule, 1, 10000, 51)
#define HISTOGRAM_TIMER_LIST(HT) \
/* Garbage collection timers. */ \
......
......@@ -542,8 +542,10 @@ class CompilationHelper {
temp_instance.function_code[i] = init_builtin;
}
isolate_->counters()->wasm_functions_per_module()->AddSample(
static_cast<int>(module_->functions.size()));
(module_->is_wasm() ? isolate_->counters()->wasm_functions_per_wasm_module()
: isolate_->counters()->wasm_functions_per_asm_module())
->AddSample(static_cast<int>(module_->functions.size()));
if (!lazy_compile) {
CompilationHelper helper(isolate_, module_);
size_t funcs_to_compile =
......
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