Commit 1d482128 authored by kschimpf's avatar kschimpf Committed by Commit bot

Separate module min memory pages counter for asm.js/WASM.

Currently, V8 uses the same size counter to measure the minimum number of memory pages allocated by a module for both asm.js and WASM. This CL separates the counter into two separate counters, and then uses the appropriate counter when measuring.

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

Review-Url: https://codereview.chromium.org/2781453004
Cr-Commit-Position: refs/heads/master@{#44204}
parent a84da1c3
......@@ -1017,7 +1017,9 @@ class RuntimeCallTimerScope {
HM(wasm_decode_module_peak_memory_bytes, V8.WasmDecodeModulePeakMemoryBytes) \
HM(wasm_compile_function_peak_memory_bytes, \
V8.WasmCompileFunctionPeakMemoryBytes) \
HM(wasm_min_mem_pages_count, V8.WasmMinMemPagesCount) \
/* TODO(karlschimpf) Update chrome flags to reflect asm/wasm split. */ \
HM(wasm_asm_min_mem_pages_count, V8.WasmMinMemPagesCount) \
HM(wasm_wasm_min_mem_pages_count, V8.WasmMinMemPagesCount) \
HM(wasm_max_mem_pages_count, V8.WasmMaxMemPagesCount) \
HM(wasm_function_size_bytes, V8.WasmFunctionSizeBytes) \
HM(wasm_module_size_bytes, V8.WasmModuleSizeBytes)
......
......@@ -1315,7 +1315,9 @@ class InstantiationHelper {
MaybeHandle<JSArrayBuffer> old_memory;
uint32_t min_mem_pages = module_->min_mem_pages;
isolate_->counters()->wasm_min_mem_pages_count()->AddSample(min_mem_pages);
(module_->is_wasm() ? isolate_->counters()->wasm_wasm_min_mem_pages_count()
: isolate_->counters()->wasm_asm_min_mem_pages_count())
->AddSample(min_mem_pages);
if (!memory_.is_null()) {
// Set externally passed ArrayBuffer non neuterable.
......
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