From a75e5892fba6d0208f33e9ab8e19e732daf94996 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Mon, 11 Mar 2019 15:49:40 +0000 Subject: 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 --- openjdkjvmti/events.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'openjdkjvmti/events.h') diff --git a/openjdkjvmti/events.h b/openjdkjvmti/events.h index abb15cc329..e48772cc66 100644 --- a/openjdkjvmti/events.h +++ b/openjdkjvmti/events.h @@ -198,7 +198,7 @@ class EventHandler { } jvmtiError SetEvent(ArtJvmTiEnv* env, - art::Thread* thread, + jthread thread, ArtJvmtiEvent event, jvmtiEventMode mode) REQUIRES(!envs_lock_); @@ -246,10 +246,13 @@ class EventHandler { REQUIRES(!envs_lock_); private: - void SetupTraceListener(JvmtiMethodTraceListener* listener, ArtJvmtiEvent event, bool enable); + jvmtiError SetupTraceListener(JvmtiMethodTraceListener* listener, + ArtJvmtiEvent event, + jthread thread, + bool enable); // Specifically handle the FramePop event which it might not always be possible to turn off. - void SetupFramePopTraceListener(bool enable); + jvmtiError SetupFramePopTraceListener(jthread thread, bool enable); template ALWAYS_INLINE @@ -309,7 +312,7 @@ class EventHandler { jclass klass) const REQUIRES(!envs_lock_); - void HandleEventType(ArtJvmtiEvent event, bool enable); + jvmtiError HandleEventType(ArtJvmtiEvent event, jthread thread, bool enable); void HandleLocalAccessCapabilityAdded(); void HandleBreakpointEventsChanged(bool enable); -- cgit v1.2.3-59-g8ed1b