diff options
-rw-r--r-- | runtime/utils.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc index 9a4c875..ad46be6 100644 --- a/runtime/utils.cc +++ b/runtime/utils.cc @@ -1120,13 +1120,20 @@ std::string GetSchedulerGroupName(pid_t tid) { void DumpNativeStack(std::ostream& os, pid_t tid, const char* prefix, mirror::ArtMethod* current_method) { - // TODO: enable on __linux__ b/15446488. -#if 0 +#if __linux__ // b/18119146 if (RUNNING_ON_VALGRIND != 0) { return; } +#if !defined(HAVE_ANDROID_OS) + if (GetTid() != tid) { + // TODO: dumping of other threads is disabled to avoid crashes during stress testing. + // b/15446488. + return; + } +#endif + std::unique_ptr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, tid)); if (!backtrace->Unwind(0)) { os << prefix << "(backtrace::Unwind failed for thread " << tid << ")\n"; |