summaryrefslogtreecommitdiffstats
path: root/runtime/utils.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-11-20 10:29:00 -0800
committerIan Rogers <irogers@google.com>2014-11-20 10:38:51 -0800
commit83597d06cd4707b19c1985353418bd99f3aca6c7 (patch)
tree2901c93180f2003c2da6cf75eb56554aa8128a16 /runtime/utils.cc
parentbdfbf86afde269ee3b38a6c928618333ffac13cf (diff)
downloadart-83597d06cd4707b19c1985353418bd99f3aca6c7.tar.gz
art-83597d06cd4707b19c1985353418bd99f3aca6c7.tar.bz2
art-83597d06cd4707b19c1985353418bd99f3aca6c7.zip
Re-enable DumpNativeStack.
Bug: 15446488 Change-Id: Icdd0b90c8abe2a361a488fc1742c6896605ddc41
Diffstat (limited to 'runtime/utils.cc')
-rw-r--r--runtime/utils.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc
index 9a4c8759b..ad46be644 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";