summaryrefslogtreecommitdiff
path: root/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc
diff options
context:
space:
mode:
author Hans Boehm <hboehm@google.com> 2022-10-13 02:47:24 +0000
committer Hans Boehm <hboehm@google.com> 2022-10-13 02:47:24 +0000
commitebd76406bf5fa74185998bc29f0f27c20fa2e683 (patch)
treebeec1accc089bbbc432a140dfebe28bb7278a909 /test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc
parentfd20a745227aa7cae7a08728bb29e5bfce64ea87 (diff)
Revert "Revert^2 "Thread suspension cleanup and deadlock fix""
This reverts commit fd20a745227aa7cae7a08728bb29e5bfce64ea87. Reason for revert: Lots of libartd failures due to new checkpoint lock level check. Change-Id: I0cf88ff893f8743a9a830a49489807d0921199a3
Diffstat (limited to 'test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc')
-rw-r--r--test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc b/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc
index 493f1d4073..78bb772893 100644
--- a/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc
+++ b/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc
@@ -81,8 +81,10 @@ extern "C" JNIEXPORT void JNICALL Java_Main_waitAndInstrumentStack(JNIEnv*,
jobject target) {
while (!instrument_waiting) {
}
+ bool timed_out = false;
Thread* other = Runtime::Current()->GetThreadList()->SuspendThreadByPeer(
- target, SuspendReason::kInternal);
+ target, SuspendReason::kInternal, &timed_out);
+ CHECK(!timed_out);
CHECK(other != nullptr);
ScopedSuspendAll ssa(__FUNCTION__);
Runtime::Current()->GetInstrumentation()->InstrumentThreadStack(other,