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

Unified Diff: runtime/vm/port.cc

Issue 9242035: Give isolates names to be used during debugging. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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
Index: runtime/vm/port.cc
===================================================================
--- runtime/vm/port.cc (revision 3366)
+++ runtime/vm/port.cc (working copy)
@@ -11,6 +11,7 @@
namespace dart {
+DECLARE_FLAG(bool, trace_isolates);
Mutex* PortMap::mutex_ = NULL;
@@ -219,7 +220,19 @@
ASSERT(callback);
bool result =
(*callback)(Api::CastIsolate(isolate), dest_port, reply_port, message);
-
+ 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"
+ "\tsource: %s\n"
+ "\treply_port: %lld\n"
+ "\tdest: %s\n"
+ "\tdest_port: %lld\n",
+ source_name, reply_port, isolate->name(), dest_port);
+ }
mutex_->Unlock();
return result;
}

Powered by Google App Engine
This is Rietveld 408576698