Dump kernel/native stacks of pure native threads.
Bug: 16463406
(cherry picked from commit 7da37cca5a5f71a0cd2442b2a119f76fa62e84b5)
Change-Id: I22a26d4ec4e3048ddcfd668eee4fccd8b2b3b727
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 650b0f9..ae89c90 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -931,6 +931,13 @@
return false;
}
+ // Threads with no managed stack frames should be shown.
+ const ManagedStack* managed_stack = thread->GetManagedStack();
+ if (managed_stack == NULL || (managed_stack->GetTopQuickFrame() == NULL &&
+ managed_stack->GetTopShadowFrame() == NULL)) {
+ return true;
+ }
+
// In some other native method? That's interesting.
// We don't just check kNative because native methods will be in state kSuspended if they're
// calling back into the VM, or kBlocked if they're blocked on a monitor, or one of the