summaryrefslogtreecommitdiffstats
path: root/vm/Misc.cpp
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2012-09-18 17:50:59 -0700
committerAndy McFadden <fadden@android.com>2012-09-18 19:01:09 -0700
commitb3667a19f5c573b7785876979af4781292d27327 (patch)
tree533234845fec7e313d2285786a451955a3906d0d /vm/Misc.cpp
parent86913b6b88b9ad4a1eea14be928da6c9485d53c0 (diff)
downloadandroid_dalvik-b3667a19f5c573b7785876979af4781292d27327.tar.gz
android_dalvik-b3667a19f5c573b7785876979af4781292d27327.tar.bz2
android_dalvik-b3667a19f5c573b7785876979af4781292d27327.zip
Log when the native trace is unavailable
This should allow us to differentiate between "couldn't get the stack" and "didn't try to get the stack". Also show the thread's state (e.g. 'R' for running, 'D' for uninterruptible syscall). Bug 7053953 Change-Id: Ibc9e6a6f0fc855a4e5e8e133122232dc939bcb16
Diffstat (limited to 'vm/Misc.cpp')
-rw-r--r--vm/Misc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/vm/Misc.cpp b/vm/Misc.cpp
index f07684878..1f01c2f45 100644
--- a/vm/Misc.cpp
+++ b/vm/Misc.cpp
@@ -699,8 +699,10 @@ bool dvmGetThreadStats(ProcStatData* pData, pid_t tid)
char* cp = strchr(lineBuf, ')');
if (cp == NULL)
goto parse_fail;
- cp++;
- for (i = 2; i < 13; i++) {
+ cp += 2;
+ pData->state = *cp++;
+
+ for (i = 3; i < 13; i++) {
cp = strchr(cp+1, ' ');
if (cp == NULL)
goto parse_fail;