diff options
| author | 2014-11-20 18:41:38 +0000 | |
|---|---|---|
| committer | 2014-11-20 18:41:38 +0000 | |
| commit | 20032e512c003a8f42735c4e1eca19c1472bb95e (patch) | |
| tree | 2901c93180f2003c2da6cf75eb56554aa8128a16 /runtime/utils.cc | |
| parent | bdfbf86afde269ee3b38a6c928618333ffac13cf (diff) | |
| parent | 83597d06cd4707b19c1985353418bd99f3aca6c7 (diff) | |
Merge "Re-enable DumpNativeStack."
Diffstat (limited to 'runtime/utils.cc')
| -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 9a4c8759b8..ad46be644f 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"; |