summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-10-06 10:12:00 +0000
committer Mythri Alle <mythria@google.com> 2022-10-06 10:12:00 +0000
commit0cc7f6bcced32d9157d9575716fce57f7d47b3b2 (patch)
tree02c00388828ea60aef231fb0113f4ad240b22fef
parent1534b780fdf366a51c6cce60cc82ead13a57a706 (diff)
Fix a bug when dumping locks from signal catcher
We dump the threads that are holding some important locks in the signal catcher on a SIGQUIT. The check missed dumping them when a mutator lock is exlcusively held but other locks aren't. Test: art/test.py Change-Id: If87c2d74ba3244d038fbc5e3a88730d36debb1e0
-rw-r--r--runtime/runtime.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 6de4ddaa0c..401d66ca50 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -2348,11 +2348,11 @@ void Runtime::DumpForSigQuit(std::ostream& os) {
}
void Runtime::DumpLockHolders(std::ostream& os) {
- uint64_t mutator_lock_owner = Locks::mutator_lock_->GetExclusiveOwnerTid();
+ pid_t mutator_lock_owner = Locks::mutator_lock_->GetExclusiveOwnerTid();
pid_t thread_list_lock_owner = GetThreadList()->GetLockOwner();
pid_t classes_lock_owner = GetClassLinker()->GetClassesLockOwner();
pid_t dex_lock_owner = GetClassLinker()->GetDexLockOwner();
- if ((thread_list_lock_owner | classes_lock_owner | dex_lock_owner) != 0) {
+ if ((mutator_lock_owner | thread_list_lock_owner | classes_lock_owner | dex_lock_owner) != 0) {
os << "Mutator lock exclusive owner tid: " << mutator_lock_owner << "\n"
<< "ThreadList lock owner tid: " << thread_list_lock_owner << "\n"
<< "ClassLinker classes lock owner tid: " << classes_lock_owner << "\n"