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

Unified Diff: runtime/vm/message_handler.cc

Issue 3004563003: Refactor Isolate name format, storage and log (Closed)
Patch Set: Make Dart_DebugName unique again Created 3 years, 4 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/json_stream.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message_handler.cc
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index 1112dc4b2cfffeea94d9da91feae4bfe2080ad64..3990b5795a8a93ef441b521adfebdfe4ac35694f 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -125,19 +125,24 @@ void MessageHandler::PostMessage(Message* message, bool before_events) {
{
MonitorLocker ml(&monitor_);
if (FLAG_trace_isolates) {
- const char* source_name = "<native code>";
Isolate* source_isolate = Isolate::Current();
if (source_isolate) {
- source_name = source_isolate->name();
+ OS::Print(
+ "[>] Posting message:\n"
+ "\tlen: %" Pd "\n\tsource: (%" Pd64
+ ") %s\n\tdest: %s\n"
+ "\tdest_port: %" Pd64 "\n",
+ message->len(), static_cast<int64_t>(source_isolate->main_port()),
+ source_isolate->name(), name(), message->dest_port());
+ } else {
+ OS::Print(
+ "[>] Posting message:\n"
+ "\tlen: %" Pd
+ "\n\tsource: <native code>\n"
+ "\tdest: %s\n"
+ "\tdest_port: %" Pd64 "\n",
+ message->len(), name(), message->dest_port());
}
- OS::Print(
- "[>] Posting message:\n"
- "\tlen: %" Pd
- "\n"
- "\tsource: %s\n"
- "\tdest: %s\n"
- "\tdest_port: %" Pd64 "\n",
- message->len(), source_name, name(), message->dest_port());
}
saved_priority = message->priority();
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698