diff options
author | Ian Rogers <irogers@google.com> | 2014-09-13 19:20:54 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-09-13 19:20:54 -0700 |
commit | 2156ff1ff09166ad8270f27d758e913f120c3640 (patch) | |
tree | c00f2c13d5ce557423bb8bf6b02b2e7cf0b1f18d /runtime/thread_list.cc | |
parent | 0785b90a38f5f2f0d5a9e3890fd16dc63a3bca10 (diff) | |
download | art-2156ff1ff09166ad8270f27d758e913f120c3640.tar.gz art-2156ff1ff09166ad8270f27d758e913f120c3640.tar.bz2 art-2156ff1ff09166ad8270f27d758e913f120c3640.zip |
Add time out to dump check point.
Change-Id: I2263c092c9957585ae90cf846e77dc8861f8a14b
Diffstat (limited to 'runtime/thread_list.cc')
-rw-r--r-- | runtime/thread_list.cc | 6 |
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: |