Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Unified Diff: src/compiler/wasm-compiler.cc

Issue 1866873002: [wasm] Adding metrics for Asm/Wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/counters.h » ('j') | src/counters.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index ff80f953eb1ffd9737fc5af809d5b89c394cb1e4..2e33c05f51101742bbe1cb35894e277b5fbead68 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2677,6 +2677,8 @@ Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module,
Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
wasm::ModuleEnv* module_env,
const wasm::WasmFunction& function) {
+ HistogramTimerScope wasm_compile_function_time_scope(
+ isolate->counters()->wasm_compile_function_time());
if (FLAG_trace_wasm_compiler) {
OFStream os(stdout);
os << "Compiling WASM function "
@@ -2780,6 +2782,9 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
static_cast<int>(function.code_end_offset - function.code_start_offset),
decode_ms, static_cast<int>(graph.NodeCount()), compile_ms);
}
+ // TODO(bradnelson): Improve histogram handling of size_t.
+ isolate->counters()->wasm_compile_function_peak_memory_bytes()->AddSample(
+ static_cast<int>(zone.allocation_size()));
return code;
}
« no previous file with comments | « no previous file | src/counters.h » ('j') | src/counters.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698