Commit 2e62c5e9 authored by Aseem Garg's avatar Aseem Garg Committed by Commit Bot

[wasm] Add uma stat for asm.js to wasm throuput

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

Change-Id: I33400fb277fff1e92a38753084c518f002685407
Reviewed-on: https://chromium-review.googlesource.com/704228
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48354}
parent 70e76dae
......@@ -271,6 +271,17 @@ CompilationJob::Status AsmJsCompilationJob::ExecuteJobImpl() {
compilation_info()->literal()->start_position();
compilation_info()->isolate()->counters()->asm_module_size_bytes()->AddSample(
module_size);
int64_t translate_time_micro = translate_timer.Elapsed().InMicroseconds();
int translation_throughput =
translate_time_micro != 0
? static_cast<int>(static_cast<int64_t>(module_size) /
translate_time_micro)
: 0;
compilation_info()
->isolate()
->counters()
->asm_wasm_translation_throughput()
->AddSample(translation_throughput);
if (FLAG_trace_asm_parser) {
PrintF(
"[asm.js translation successful: time=%0.3fms, "
......
......@@ -1029,7 +1029,9 @@ class RuntimeCallTimerScope {
V8.AsmWasmTranslationPeakMemoryBytes, 1, GB, 51) \
HR(wasm_compile_function_peak_memory_bytes, \
V8.WasmCompileFunctionPeakMemoryBytes, 1, GB, 51) \
HR(asm_module_size_bytes, V8.AsmModuleSizeBytes, 1, GB, 51)
HR(asm_module_size_bytes, V8.AsmModuleSizeBytes, 1, GB, 51) \
HR(asm_wasm_translation_throughput, V8.AsmWasmTranslationThroughput, 1, 100, \
20)
#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