diff options
| author | 2016-03-01 14:38:37 -0800 | |
|---|---|---|
| committer | 2016-03-10 19:09:54 -0800 | |
| commit | 8d1594da6e97cd11580baf30ee4b75d4e7e2616a (patch) | |
| tree | 05edaae53f26cde16f913eeab7020f9006dd20db | |
| parent | b7f257f353b1eb2db2732939a0404c118316891d (diff) | |
ART: Allow unwinding unattached threads
Partial revert of commit ed8b723c5f3989d2593ec21c65c96d6d8bf25579.
Make it (constexpr) configurable whether we allow unwinding native
stacks of unattached threads.
Bug: 27449879
Change-Id: I307a80c9a0166f33fa8a41e492d7eb0d77d0e44f
| -rw-r--r-- | runtime/thread_list.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc index 4c81d4f1e3..afb11d33e9 100644 --- a/runtime/thread_list.cc +++ b/runtime/thread_list.cc @@ -57,6 +57,10 @@ static constexpr useconds_t kThreadSuspendInitialSleepUs = 0; static constexpr useconds_t kThreadSuspendMaxYieldUs = 3000; static constexpr useconds_t kThreadSuspendMaxSleepUs = 5000; +// Whether we should try to dump the native stack of unattached threads. See commit ed8b723 for +// some history. +static constexpr bool kDumpUnattachedThreadNativeStack = true; + ThreadList::ThreadList() : suspend_all_count_(0), debug_suspend_all_count_(0), @@ -138,9 +142,7 @@ static void DumpUnattachedThread(std::ostream& os, pid_t tid) NO_THREAD_SAFETY_A // refactor DumpState to avoid skipping analysis. Thread::DumpState(os, nullptr, tid); DumpKernelStack(os, tid, " kernel: ", false); - // TODO: Reenable this when the native code in system_server can handle it. - // Currently "adb shell kill -3 `pid system_server`" will cause it to exit. - if (false) { + if (kDumpUnattachedThreadNativeStack) { DumpNativeStack(os, tid, nullptr, " native: "); } os << "\n"; |