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

Unified Diff: runtime/vm/message_handler.cc

Issue 1311503004: Remember when an isolate was paused and subtly display it in Obseravatory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
Index: runtime/vm/message_handler.cc
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index d330c0f64a68d462b6ccc39ae5c1bcf20c653d9a..77604e8d34a5fb9f22741a7e9afd5d0958dd1ce3 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -6,9 +6,11 @@
#include "vm/dart.h"
#include "vm/lockers.h"
+#include "vm/os.h"
#include "vm/port.h"
#include "vm/thread_interrupter.h"
+
namespace dart {
DECLARE_FLAG(bool, trace_isolates);
@@ -42,6 +44,7 @@ MessageHandler::MessageHandler()
pause_on_exit_(false),
paused_on_start_(false),
paused_on_exit_(false),
+ paused_timestamp_(-1),
pool_(NULL),
task_(NULL),
start_callback_(NULL),
@@ -250,6 +253,7 @@ void MessageHandler::TaskCallback() {
NotifyPauseOnStart();
monitor_.Enter();
paused_on_start_ = true;
+ paused_timestamp_ = OS::GetCurrentTimeMillis();
}
HandleMessages(false, false);
if (pause_on_start()) {
@@ -258,6 +262,7 @@ void MessageHandler::TaskCallback() {
return;
} else {
paused_on_start_ = false;
+ paused_timestamp_ = -1;
}
}
@@ -286,6 +291,7 @@ void MessageHandler::TaskCallback() {
}
notify_paused_on_exit = true;
paused_on_exit_ = true;
+ paused_timestamp_ = OS::GetCurrentTimeMillis();
}
} else {
if (FLAG_trace_isolates) {
@@ -297,6 +303,7 @@ void MessageHandler::TaskCallback() {
pool_ = NULL;
run_end_callback = true;
paused_on_exit_ = false;
+ paused_timestamp_ = -1;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698