summaryrefslogtreecommitdiffstats
path: root/vm/interp
diff options
context:
space:
mode:
authorPal Szasz <pal.szasz@sonymobile.com>2012-05-16 14:45:26 +0200
committerJohan Redestig <johan.redestig@sonymobile.com>2012-12-06 08:13:32 +0100
commit5605832d8d8d1a5af1bf8590b7c8e10e8aa31269 (patch)
tree26967cd026cb7588d8ef73b058a6a2e0f7be6a30 /vm/interp
parentc83353bc0d7ddfedd3bc06fdb12f25710191e1e6 (diff)
downloadandroid_dalvik-5605832d8d8d1a5af1bf8590b7c8e10e8aa31269.tar.gz
android_dalvik-5605832d8d8d1a5af1bf8590b7c8e10e8aa31269.tar.bz2
android_dalvik-5605832d8d8d1a5af1bf8590b7c8e10e8aa31269.zip
Print the locker thread when waiting on an object
When dumping stacktraces, and if one thread is blocked due to a call to Object.wait, the dump will just tell us the object pointer it is waiting on, but not the thread which actually locked the object. This patch tries to extract that informatation as well. Note that this information is not always available, since maybe no other thread aquired the lock yet. Change-Id: Id0ae23e17c58fc3712251f00b0a741191b5a5aee
Diffstat (limited to 'vm/interp')
-rw-r--r--vm/interp/Stack.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm/interp/Stack.cpp b/vm/interp/Stack.cpp
index 9ef92c7b9..1433f13dc 100644
--- a/vm/interp/Stack.cpp
+++ b/vm/interp/Stack.cpp
@@ -1253,6 +1253,9 @@ static void dumpFrames(const DebugOutputTarget* target, void* framePtr,
if (obj->clazz == gDvm.classJavaLangVMThread) {
joinThread = dvmGetThreadFromThreadObject(obj);
}
+ if (joinThread == NULL) {
+ joinThread = dvmGetObjectLockHolder(obj);
+ }
printWaitMessage(target, "on", obj, joinThread);
}
} else if (thread->status == THREAD_MONITOR) {