diff options
author | 2022-10-14 20:29:02 +0000 | |
---|---|---|
committer | 2022-10-21 22:43:37 +0000 | |
commit | a23d325152c7cd81ccb426a407f6da280797e61d (patch) | |
tree | c4c74bbbdeaeb97ebb622b5d8e4ca42589186ddf /runtime/native/java_lang_Thread.cc | |
parent | 3e1b1f8ff913d2fb811e3fe5714552fc98000d15 (diff) |
Revert^4 "Thread suspension cleanup and deadlock fix"
This reverts commit ebd76406bf5fa74185998bc29f0f27c20fa2e683.
PS1 is identical to aosp/2216806.
PS2 in addition converts the RunCheckpoint call used from
StackUtil::GetAllStackTraces to RunCheckpointUnchecked to temporarily
work around another checkpoint Run() function lock ordering
issue.
PS3 is a nontrivial rebase.
Test: Build and boot AOSP, Treehugger
Bug: 240742796
Bug: 203363895
Bug: 238032384
Bug: 253671779
Change-Id: I38385e41392652cc30e5e74fd8b93e22088827a5
Diffstat (limited to 'runtime/native/java_lang_Thread.cc')
-rw-r--r-- | runtime/native/java_lang_Thread.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc index 570c554782..fd67a0a7fa 100644 --- a/runtime/native/java_lang_Thread.cc +++ b/runtime/native/java_lang_Thread.cc @@ -147,11 +147,8 @@ static void Thread_setNativeName(JNIEnv* env, jobject peer, jstring java_name) { // thread list lock to avoid this, as setting the thread name causes mutator to lock/unlock // in the DDMS send code. ThreadList* thread_list = Runtime::Current()->GetThreadList(); - bool timed_out; // Take suspend thread lock to avoid races with threads trying to suspend this one. - Thread* thread = thread_list->SuspendThreadByPeer(peer, - SuspendReason::kInternal, - &timed_out); + Thread* thread = thread_list->SuspendThreadByPeer(peer, SuspendReason::kInternal); if (thread != nullptr) { { ScopedObjectAccess soa(env); @@ -159,9 +156,6 @@ static void Thread_setNativeName(JNIEnv* env, jobject peer, jstring java_name) { } bool resumed = thread_list->Resume(thread, SuspendReason::kInternal); DCHECK(resumed); - } else if (timed_out) { - LOG(ERROR) << "Trying to set thread name to '" << name.c_str() << "' failed as the thread " - "failed to suspend within a generous timeout."; } } |