summaryrefslogtreecommitdiff
path: root/openjdkjvmti/ti_stack.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2019-03-11 15:49:40 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2019-03-11 21:59:44 +0000
commita75e5892fba6d0208f33e9ab8e19e732daf94996 (patch)
tree3daff8c3ce1608bacba7358711ccf9bd61c0bb05 /openjdkjvmti/ti_stack.cc
parentdd83a40a3c4fea0d917577de96742900a61ab548 (diff)
Revert^2 "Remove Global deopt requirement for several jvmti events"
This reverts commit ad344b6a14feba90a06a205760e9bc766c56cab0. Jit-on-first-use would cause the runtime to skip sending FramePop events for exceptions in some circumstances due to longjmp-ing over the frames. This requires forcing jit off from the first instant a thread can get frame popped events, which is unfortunate. Reason for revert: Fixed issue causing 1925 to fail on jit-on-first-use and redefine-stress Test: ./test.py --host Test: ./art/test/testrunner/run_build_test_target.py -j50 art-jit-on-first-use Change-Id: I6ec2a799db1041262a055be10e1af1faece6f2fc
Diffstat (limited to 'openjdkjvmti/ti_stack.cc')
-rw-r--r--openjdkjvmti/ti_stack.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc
index 385ac45488..5e934df42c 100644
--- a/openjdkjvmti/ti_stack.cc
+++ b/openjdkjvmti/ti_stack.cc
@@ -1061,8 +1061,14 @@ jvmtiError StackUtil::NotifyFramePop(jvmtiEnv* env, jthread thread, jint depth)
art::ShadowFrame* shadow_frame = visitor.GetOrCreateShadowFrame(&needs_instrument);
{
art::WriterMutexLock lk(self, tienv->event_info_mutex_);
- // Mark shadow frame as needs_notify_pop_
- shadow_frame->SetNotifyPop(true);
+ if (LIKELY(!shadow_frame->NeedsNotifyPop())) {
+ // Ensure we won't miss exceptions being thrown if we get jit-compiled. We only do this for
+ // the first NotifyPopFrame.
+ target->IncrementForceInterpreterCount();
+
+ // Mark shadow frame as needs_notify_pop_
+ shadow_frame->SetNotifyPop(true);
+ }
tienv->notify_frames.insert(shadow_frame);
}
// Make sure can we will go to the interpreter and use the shadow frames.