summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-01-10 02:06:04 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-01-10 02:06:05 +0000
commit80f9e897043baf06b24e6308b501a22af413bc80 (patch)
treeb1d14e28d63fe97cb4295e07f8f34ab508073465
parent313c9c6413b78e0f9ed791ce079490423872c2d8 (diff)
parent4a3d19bfc16e3f5bfb796fb7ed24404fa77007a4 (diff)
Merge "ART: Increase dump checkpoint timeout on the host"
-rw-r--r--runtime/thread_list.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 9707c7ba7a..20fbc371c1 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -150,6 +150,11 @@ void ThreadList::DumpUnattachedThreads(std::ostream& os) {
closedir(d);
}
+// Dump checkpoint timeout in milliseconds. Larger amount on the host, as dumping will invoke
+// addr2line when available.
+static constexpr uint32_t kDumpWaitTimeoutTarget = 10000;
+static constexpr uint32_t kDumpWaitTimeoutHost = 20000;
+
// A closure used by Thread::Dump.
class DumpCheckpoint FINAL : public Closure {
public:
@@ -176,8 +181,8 @@ class DumpCheckpoint FINAL : public Closure {
void WaitForThreadsToRunThroughCheckpoint(size_t threads_running_checkpoint) {
Thread* self = Thread::Current();
ScopedThreadStateChange tsc(self, kWaitingForCheckPointsToRun);
- const uint32_t kWaitTimeoutMs = 10000;
- bool timed_out = barrier_.Increment(self, threads_running_checkpoint, kWaitTimeoutMs);
+ bool timed_out = barrier_.Increment(self, threads_running_checkpoint,
+ kIsTargetBuild ? kDumpWaitTimeoutTarget : kDumpWaitTimeoutHost);
if (timed_out) {
// Avoid a recursive abort.
LOG((kIsDebugBuild && (gAborting == 0)) ? FATAL : ERROR)