Commit 51f95dea authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[asm.js] Remove special casing for --predictable message.

This makes message reporting use the same message text for the normal
as well as --predictable execution. Running in predictable mode should
just suppress all asm.js messages wholesale if needed.

R=clemensh@chromium.org

Change-Id: Ice1e83c4b098fbc4c3b301c685614afe26190016
Reviewed-on: https://chromium-review.googlesource.com/506093Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45368}
parent 96628339
...@@ -127,15 +127,10 @@ void ReportCompilationSuccess(Handle<Script> script, int position, ...@@ -127,15 +127,10 @@ void ReportCompilationSuccess(Handle<Script> script, int position,
uintptr_t module_size) { uintptr_t module_size) {
if (FLAG_suppress_asm_messages || !FLAG_trace_asm_time) return; if (FLAG_suppress_asm_messages || !FLAG_trace_asm_time) return;
EmbeddedVector<char, 100> text; EmbeddedVector<char, 100> text;
int length; int length = SNPrintF(
if (FLAG_predictable) { text,
length = SNPrintF(text, "success"); "success, asm->wasm: %0.3f ms, compile: %0.3f ms, %" PRIuPTR " bytes",
} else { translate_time, compile_time, module_size);
length = SNPrintF(
text,
"success, asm->wasm: %0.3f ms, compile: %0.3f ms, %" PRIuPTR " bytes",
translate_time, compile_time, module_size);
}
CHECK_NE(-1, length); CHECK_NE(-1, length);
text.Truncate(length); text.Truncate(length);
Report(script, position, text, MessageTemplate::kAsmJsCompiled, Report(script, position, text, MessageTemplate::kAsmJsCompiled,
...@@ -156,12 +151,7 @@ void ReportInstantiationSuccess(Handle<Script> script, int position, ...@@ -156,12 +151,7 @@ void ReportInstantiationSuccess(Handle<Script> script, int position,
double instantiate_time) { double instantiate_time) {
if (FLAG_suppress_asm_messages || !FLAG_trace_asm_time) return; if (FLAG_suppress_asm_messages || !FLAG_trace_asm_time) return;
EmbeddedVector<char, 50> text; EmbeddedVector<char, 50> text;
int length; int length = SNPrintF(text, "success, %0.3f ms", instantiate_time);
if (FLAG_predictable) {
length = SNPrintF(text, "success");
} else {
length = SNPrintF(text, "success, %0.3f ms", instantiate_time);
}
CHECK_NE(-1, length); CHECK_NE(-1, length);
text.Truncate(length); text.Truncate(length);
Report(script, position, text, MessageTemplate::kAsmJsInstantiated, Report(script, position, text, MessageTemplate::kAsmJsInstantiated,
......
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