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

Unified Diff: runtime/vm/safepoint.cc

Issue 2172763002: Print safepoint message only after some attempts. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/safepoint.cc
diff --git a/runtime/vm/safepoint.cc b/runtime/vm/safepoint.cc
index ae1405a81825630f58d6e025e092b4e1714c08ca..7f5d92d0d240bdc0590e04192b1158b33f63603a 100644
--- a/runtime/vm/safepoint.cc
+++ b/runtime/vm/safepoint.cc
@@ -110,9 +110,13 @@ void SafepointHandler::SafepointThreads(Thread* T) {
Monitor::WaitResult retval = sl.Wait(1000);
if (retval == Monitor::kTimedOut) {
num_attempts += 1;
- OS::Print("Attempt:%" Pd " waiting for %d threads to check in\n",
- num_attempts,
- number_threads_not_at_safepoint_);
+ if (num_attempts > 10) {
+ // We have been waiting too long, start logging this as we might
+ // have an issue where a thread is not checking in for a safepoint.
+ OS::Print("Attempt:%" Pd " waiting for %d threads to check in\n",
+ num_attempts,
+ number_threads_not_at_safepoint_);
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698