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

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

Issue 2710603006: [wasm] Move compilation-related methods to CompilationHelper in wasm-module.cc. (Closed)
Patch Set: Smaller buffer Created 3 years, 10 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/wasm/wasm-module.cc » ('j') | no next file with comments »
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 7b279ebf703d731ee7ef445294f1f3f5354b9f1d..2dc1db6df18190cf1669a20f36887f7be72d0d65 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -4091,11 +4091,10 @@ void WasmCompilationUnit::ExecuteCompilation() {
if (FLAG_trace_wasm_decode_time) {
double pipeline_ms = pipeline_timer.Elapsed().InMillisecondsF();
PrintF(
- "wasm-compilation phase 1 ok: %d bytes, %0.3f ms decode, %zu nodes, "
+ "wasm-compilation phase 1 ok: %u bytes, %0.3f ms decode, %zu nodes, "
"%0.3f ms pipeline\n",
- static_cast<int>(function_->code_end_offset -
- function_->code_start_offset),
- decode_ms, node_count, pipeline_ms);
+ function_->code_end_offset - function_->code_start_offset, decode_ms,
+ node_count, pipeline_ms);
}
}
@@ -4112,13 +4111,13 @@ Handle<Code> WasmCompilationUnit::FinishCompilation() {
return Handle<Code>::null();
}
+ base::ElapsedTimer codegen_timer;
+ if (FLAG_trace_wasm_decode_time) {
+ codegen_timer.Start();
+ }
if (job_->FinalizeJob() != CompilationJob::SUCCEEDED) {
return Handle<Code>::null();
}
- base::ElapsedTimer compile_timer;
- if (FLAG_trace_wasm_decode_time) {
- compile_timer.Start();
- }
Handle<Code> code = info_.code();
DCHECK(!code.is_null());
@@ -4131,11 +4130,10 @@ Handle<Code> WasmCompilationUnit::FinishCompilation() {
}
if (FLAG_trace_wasm_decode_time) {
- double compile_ms = compile_timer.Elapsed().InMillisecondsF();
- PrintF("wasm-code-generation ok: %d bytes, %0.3f ms code generation\n",
- static_cast<int>(function_->code_end_offset -
- function_->code_start_offset),
- compile_ms);
+ double codegen_ms = codegen_timer.Elapsed().InMillisecondsF();
+ PrintF("wasm-code-generation ok: %u bytes, %0.3f ms code generation\n",
+ function_->code_end_offset - function_->code_start_offset,
+ codegen_ms);
}
return code;
« no previous file with comments | « no previous file | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698