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

Unified Diff: src/asmjs/asm-js.cc

Issue 2658703003: [wasm][asm.js] Add wasm module size to asm debug measurements. (Closed)
Patch Set: fix Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-js.cc
diff --git a/src/asmjs/asm-js.cc b/src/asmjs/asm-js.cc
index b4026b0b191e934df8f0e7e0e9a1c396e54a771c..934a1d5bd0e4edcbe617d280fffb98f460132f09 100644
--- a/src/asmjs/asm-js.cc
+++ b/src/asmjs/asm-js.cc
@@ -191,6 +191,8 @@ MaybeHandle<FixedArray> AsmJs::CompileAsmViaWasm(CompilationInfo* info) {
internal::wasm::kAsmJsOrigin, info->script(), asm_offsets_vec);
DCHECK(!compiled.is_null());
double compile_time = compile_timer.Elapsed().InMillisecondsF();
+ DCHECK_GE(module->end(), module->begin());
+ uintptr_t wasm_size = module->end() - module->begin();
wasm::AsmTyper::StdlibSet uses = builder.typer()->StdlibUses();
Handle<FixedArray> uses_array =
@@ -216,10 +218,10 @@ MaybeHandle<FixedArray> AsmJs::CompileAsmViaWasm(CompilationInfo* info) {
if (FLAG_predictable) {
length = base::OS::SNPrintF(text, arraysize(text), "success");
} else {
- length =
- base::OS::SNPrintF(text, arraysize(text),
- "success, asm->wasm: %0.3f ms, compile: %0.3f ms",
- asm_wasm_time, compile_time);
+ length = base::OS::SNPrintF(
+ text, arraysize(text),
+ "success, asm->wasm: %0.3f ms, compile: %0.3f ms, %" PRIuPTR " bytes",
+ asm_wasm_time, compile_time, wasm_size);
}
DCHECK_NE(-1, length);
USE(length);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698