Chromium Code Reviews| Index: runtime/vm/deopt_instructions.cc |
| diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc |
| index a926fdf7458427dd7a7c0510c4b130a6d45c249b..9db3fe9379a71bdbe4a658d0e0dab05bedd0a8e8 100644 |
| --- a/runtime/vm/deopt_instructions.cc |
| +++ b/runtime/vm/deopt_instructions.cc |
| @@ -143,18 +143,21 @@ DeoptContext::~DeoptContext() { |
| TimelineStream* compiler_stream = isolate->GetCompilerStream(); |
| ASSERT(compiler_stream != NULL); |
| if (compiler_stream->Enabled()) { |
| + // Allocate what is needed before StarEvent, which is blocking allocation |
|
Cutch
2016/02/25 00:10:06
suggestion: Allocate all Dart objects needed befor
regis
2016/02/25 17:47:27
Done.
|
| + // and GC until Complete. |
| const Code& code = Code::Handle(zone(), code_); |
| const Function& function = Function::Handle(zone(), code.function()); |
| - const char* function_name = function.QualifiedUserVisibleNameCString(); |
| + const String& function_name = |
| + String::Handle(zone(), function.QualifiedScrubbedName()); |
| const char* reason = DeoptReasonToCString(deopt_reason()); |
| - int counter = function.deoptimization_counter(); |
| + const int counter = function.deoptimization_counter(); |
| TimelineEvent* timeline_event = compiler_stream->StartEvent(); |
| if (timeline_event != NULL) { |
| timeline_event->Duration("Deoptimize", |
| deopt_start_micros_, |
| OS::GetCurrentMonotonicMicros()); |
| timeline_event->SetNumArguments(3); |
| - timeline_event->CopyArgument(0, "function", function_name); |
| + timeline_event->CopyArgument(0, "function", function_name.ToCString()); |
| timeline_event->CopyArgument(1, "reason", reason); |
| timeline_event->FormatArgument(2, "deoptimizationCount", "%d", counter); |
| timeline_event->Complete(); |