summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-09-14 02:33:18 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-09-14 02:33:19 +0000
commit91bbd5347b391278b56440b2dbb0b77526bae4e8 (patch)
treec00f2c13d5ce557423bb8bf6b02b2e7cf0b1f18d
parent0785b90a38f5f2f0d5a9e3890fd16dc63a3bca10 (diff)
parent2156ff1ff09166ad8270f27d758e913f120c3640 (diff)
Merge "Add time out to dump check point."
-rw-r--r--runtime/thread_list.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 3cc2a2892d..2dbfb3ebc7 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -156,7 +156,11 @@ class DumpCheckpoint FINAL : public Closure {
void WaitForThreadsToRunThroughCheckpoint(size_t threads_running_checkpoint) {
Thread* self = Thread::Current();
ScopedThreadStateChange tsc(self, kWaitingForCheckPointsToRun);
- barrier_.Increment(self, threads_running_checkpoint);
+ const uint32_t kWaitTimeoutMs = 10000;
+ bool timed_out = barrier_.Increment(self, threads_running_checkpoint, kWaitTimeoutMs);
+ if (timed_out) {
+ LOG(kIsDebugBuild ? FATAL : ERROR) << "Unexpected time out during dump checkpoint.";
+ }
}
private: