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}
This commit is contained in:
parent
15247047e5
commit
3570100696
@ -926,7 +926,8 @@ class RuntimeCallTimerScope {
|
|||||||
HR(scavenge_reason, V8.GCScavengeReason, 0, 21, 22) \
|
HR(scavenge_reason, V8.GCScavengeReason, 0, 21, 22) \
|
||||||
HR(young_generation_handling, V8.GCYoungGenerationHandling, 0, 2, 3) \
|
HR(young_generation_handling, V8.GCYoungGenerationHandling, 0, 2, 3) \
|
||||||
/* Asm/Wasm. */ \
|
/* 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) \
|
#define HISTOGRAM_TIMER_LIST(HT) \
|
||||||
/* Garbage collection timers. */ \
|
/* Garbage collection timers. */ \
|
||||||
|
@ -542,8 +542,10 @@ class CompilationHelper {
|
|||||||
temp_instance.function_code[i] = init_builtin;
|
temp_instance.function_code[i] = init_builtin;
|
||||||
}
|
}
|
||||||
|
|
||||||
isolate_->counters()->wasm_functions_per_module()->AddSample(
|
(module_->is_wasm() ? isolate_->counters()->wasm_functions_per_wasm_module()
|
||||||
static_cast<int>(module_->functions.size()));
|
: isolate_->counters()->wasm_functions_per_asm_module())
|
||||||
|
->AddSample(static_cast<int>(module_->functions.size()));
|
||||||
|
|
||||||
if (!lazy_compile) {
|
if (!lazy_compile) {
|
||||||
CompilationHelper helper(isolate_, module_);
|
CompilationHelper helper(isolate_, module_);
|
||||||
size_t funcs_to_compile =
|
size_t funcs_to_compile =
|
||||||
|
Loading…
Reference in New Issue
Block a user