| Index: runtime/vm/compiler.cc
|
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
|
| index de4987a0b71dd5d190429553c7bf99e066052cd8..afb0f99e938c3c1825b3292eafb7d7cddfdaec07 100644
|
| --- a/runtime/vm/compiler.cc
|
| +++ b/runtime/vm/compiler.cc
|
| @@ -32,6 +32,7 @@
|
| #include "vm/symbols.h"
|
| #include "vm/tags.h"
|
| #include "vm/timer.h"
|
| +#include "vm/trace_buffer.h"
|
|
|
| namespace dart {
|
|
|
| @@ -604,11 +605,13 @@ static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function,
|
| // If the error isn't due to an out of range branch offset, we don't
|
| // try again (done = true), and indicate that we did not finish
|
| // compiling (is_compiled = false).
|
| - if (FLAG_trace_bailout) {
|
| - const Error& bailout_error = Error::Handle(
|
| + const Error& bailout_error = Error::Handle(
|
| isolate->object_store()->sticky_error());
|
| + if (FLAG_trace_bailout) {
|
| OS::Print("%s\n", bailout_error.ToErrorCString());
|
| }
|
| + function.log()->TraceF("Failed to compile optimized code: %s",
|
| + bailout_error.ToErrorCString());
|
| done = true;
|
| ASSERT(optimized);
|
| }
|
| @@ -767,6 +770,9 @@ static RawError* CompileFunctionHelper(const Function& function,
|
| per_compile_timer.Start();
|
| ParsedFunction* parsed_function =
|
| new ParsedFunction(Function::ZoneHandle(function.raw()));
|
| + function.log()->TraceF("Compiled %s%s",
|
| + (osr_id == Isolate::kNoDeoptId ? "" : "osr "),
|
| + (optimized ? "optimized " : ""));
|
| if (FLAG_trace_compiler) {
|
| OS::Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n",
|
| (osr_id == Isolate::kNoDeoptId ? "" : "osr "),
|
| @@ -785,6 +791,7 @@ static RawError* CompileFunctionHelper(const Function& function,
|
| CompileParsedFunctionHelper(parsed_function, optimized, osr_id);
|
| if (optimized && !success) {
|
| // Optimizer bailed out. Disable optimizations and to never try again.
|
| + function.log()->TraceF("Optimizations disabled");
|
| if (FLAG_trace_compiler) {
|
| OS::Print("--> disabling optimizations for '%s'\n",
|
| function.ToFullyQualifiedCString());
|
|
|