Commit 70e76dae authored by Aseem Garg's avatar Aseem Garg Committed by Commit Bot

[wasm] Add uma stat for asm.js module size

BUG=chromium:770618
R=kschimpf@chromium.org,bradnelson@chromium.org,isherman@chromium.org

Change-Id: I953c9e7b58de0ca9ac05a9f5f64f139fcf7dd1a7
Reviewed-on: https://chromium-review.googlesource.com/703890Reviewed-by: 's avatarAseem Garg <aseemgarg@chromium.org>
Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48353}
parent d9057b55
......@@ -267,6 +267,10 @@ CompilationJob::Status AsmJsCompilationJob::ExecuteJobImpl() {
->asm_wasm_translation_peak_memory_bytes()
->AddSample(static_cast<int>(translate_zone_size));
translate_time_ = translate_timer.Elapsed().InMillisecondsF();
int module_size = compilation_info()->literal()->end_position() -
compilation_info()->literal()->start_position();
compilation_info()->isolate()->counters()->asm_module_size_bytes()->AddSample(
module_size);
if (FLAG_trace_asm_parser) {
PrintF(
"[asm.js translation successful: time=%0.3fms, "
......
......@@ -1028,7 +1028,8 @@ class RuntimeCallTimerScope {
HR(asm_wasm_translation_peak_memory_bytes, \
V8.AsmWasmTranslationPeakMemoryBytes, 1, GB, 51) \
HR(wasm_compile_function_peak_memory_bytes, \
V8.WasmCompileFunctionPeakMemoryBytes, 1, GB, 51)
V8.WasmCompileFunctionPeakMemoryBytes, 1, GB, 51) \
HR(asm_module_size_bytes, V8.AsmModuleSizeBytes, 1, GB, 51)
#define HISTOGRAM_TIMER_LIST(HT) \
/* Garbage collection timers. */ \
......
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