ART: Increase dump checkpoint timeout on the host
Increase the dump checkpoint timeout on the host, as addr2line is
used and may put more strain onto the system.
Bug: 18964791
Change-Id: I9c1e9c1289fddfce25854e4425194882628bcf21
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 9707c7b..20fbc37 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -150,6 +150,11 @@
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 @@
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)