summaryrefslogtreecommitdiff
path: root/runtime/stack.cc
diff options
context:
space:
mode:
author Hans Boehm <hboehm@google.com> 2023-03-29 01:24:05 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-03-29 01:24:05 +0000
commit63af30b8fe8d4e1dc32db4dcb5e5dae1efdc7f31 (patch)
tree2c4374ef7c7561d7e9157a8bd32d9e3bee069be5 /runtime/stack.cc
parent221b6c5fcd66d4b6f2626c311d03bde2fb1589f9 (diff)
Revert "Revert^8 "Thread suspension cleanup and deadlock fix""
This reverts commit 221b6c5fcd66d4b6f2626c311d03bde2fb1589f9. Reason for revert: Preemptive revert. Earlier versions have had a tendency to cause subtle breakage. Please do not submit unless something breaks. Change-Id: Iad2a7f920756f365789c422948632f5db5a28fd5
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index bf844b48e4..d7d5851130 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -77,7 +77,7 @@ StackVisitor::StackVisitor(Thread* thread,
context_(context),
check_suspended_(check_suspended) {
if (check_suspended_) {
- DCHECK(thread == Thread::Current() || thread->GetState() != ThreadState::kRunnable) << *thread;
+ DCHECK(thread == Thread::Current() || thread->IsSuspended()) << *thread;
}
}
@@ -801,7 +801,7 @@ uint8_t* StackVisitor::GetShouldDeoptimizeFlagAddr() const REQUIRES_SHARED(Locks
template <StackVisitor::CountTransitions kCount>
void StackVisitor::WalkStack(bool include_transitions) {
if (check_suspended_) {
- DCHECK(thread_ == Thread::Current() || thread_->GetState() != ThreadState::kRunnable);
+ DCHECK(thread_ == Thread::Current() || thread_->IsSuspended());
}
CHECK_EQ(cur_depth_, 0U);