From e91e795a77b96d58276f75b1b244a5509ef8c215 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 23 Jan 2020 10:15:56 +0000 Subject: Replace instrumention id with stack pointers. Replace instrumentation ids for instrumentation frames, which are inherently broken (see b/72608560), and use stack addresses instead to properly identify which frames to pop / unwind. Bug: 72608560 Bug: 148166031 Test: ./art/test/testrunner/testrunner.py --trace --debuggable --ndebuggable --optimizing --interpreter --jit --debug --ndebug -j32 Test: run-libjdwp-tests.sh Test: 2011-stack-walk-concurrent-instrument Test: ./art/test/run-test --host --dev --runtime-option -verbose:deopt,plugin --prebuild --compact-dex-level fast --jit --no-relocate --create-runner --runtime-option -Xcheck:jni 1965-get-set-local-primitive-no-tables art/tools/parallel_run.py -j80 /tmp/path/to/runit.sh --out failure.txt Change-Id: I71f6e55b9da608796cd3142b147f7b50bbd292ec --- openjdkjvmti/deopt_manager.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openjdkjvmti/deopt_manager.cc') diff --git a/openjdkjvmti/deopt_manager.cc b/openjdkjvmti/deopt_manager.cc index 3b04ed8be8..3e3691a16a 100644 --- a/openjdkjvmti/deopt_manager.cc +++ b/openjdkjvmti/deopt_manager.cc @@ -487,9 +487,11 @@ void DeoptManager::AddDeoptimizationRequester() { void DeoptManager::DeoptimizeThread(art::Thread* target) { // We might or might not be running on the target thread (self) so get Thread::Current // directly. + art::ScopedThreadSuspension sts(art::Thread::Current(), art::kSuspended); art::gc::ScopedGCCriticalSection sgccs(art::Thread::Current(), art::gc::GcCause::kGcCauseDebugger, art::gc::CollectorType::kCollectorTypeDebugger); + art::ScopedSuspendAll ssa("Instrument thread stack"); art::Runtime::Current()->GetInstrumentation()->InstrumentThreadStack(target); } -- cgit v1.2.3-59-g8ed1b