| Index: runtime/vm/safepoint.cc
|
| diff --git a/runtime/vm/safepoint.cc b/runtime/vm/safepoint.cc
|
| index fcf287237624be98a06bd1ea554f0a8a504c340c..6cbd0f7840f3a2b0272fe75adee75d3060c47ea3 100644
|
| --- a/runtime/vm/safepoint.cc
|
| +++ b/runtime/vm/safepoint.cc
|
| @@ -96,8 +96,15 @@ void SafepointHandler::SafepointThreads(Thread* T) {
|
| // Now wait for all threads that are not already at a safepoint to check-in.
|
| {
|
| MonitorLocker sl(safepoint_lock_);
|
| + intptr_t num_attempts = 0;
|
| while (number_threads_not_at_safepoint_ > 0) {
|
| - sl.Wait();
|
| + 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_);
|
| + }
|
| }
|
| }
|
| }
|
|
|