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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 1723733002: Simplify various name flavors in VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 4 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 | « runtime/vm/debugger.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index a926fdf7458427dd7a7c0510c4b130a6d45c249b..1aa11b76da285ad8748dd321e5cf62d2f6e00718 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 all Dart objects needed before calling StartEvent,
+ // which blocks safe points until Complete is called.
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();
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698