[asm.js] Add tracking of parser zone memory footprint.

R=clemensh@chromium.org

Change-Id: Ic1cc9bd5560a315128242dc58b29a76e359ca11f
Reviewed-on: https://chromium-review.googlesource.com/507212
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45389}
This commit is contained in:
Michael Starzinger 2017-05-17 16:31:28 +02:00 committed by Commit Bot
parent bfa319e5d3
commit a7462060ea
2 changed files with 23 additions and 17 deletions

View File

@ -206,6 +206,10 @@ MaybeHandle<FixedArray> AsmJs::CompileAsmViaWasm(CompilationInfo* info) {
size_t compile_zone_size =
info->zone()->allocation_size() - compile_zone_start;
size_t translate_zone_size = translate_zone.allocation_size();
info->isolate()
->counters()
->asm_wasm_translation_peak_memory_bytes()
->AddSample(static_cast<int>(translate_zone_size));
translate_time = translate_timer.Elapsed().InMillisecondsF();
if (FLAG_trace_asm_parser) {
PrintF(

View File

@ -1036,7 +1036,9 @@ class RuntimeCallTimerScope {
HM(wasm_asm_function_size_bytes, V8.WasmFunctionSizeBytes.asm) \
HM(wasm_wasm_function_size_bytes, V8.WasmFunctionSizeBytes.wasm) \
HM(wasm_asm_module_size_bytes, V8.WasmModuleSizeBytes.asm) \
HM(wasm_wasm_module_size_bytes, V8.WasmModuleSizeBytes.wasm)
HM(wasm_wasm_module_size_bytes, V8.WasmModuleSizeBytes.wasm) \
HM(asm_wasm_translation_peak_memory_bytes, \
V8.AsmWasmTranslationPeakMemoryBytes)
// WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC
// Intellisense to crash. It was broken into two macros (each of length 40