diff options
author | 2018-03-06 15:13:59 -0800 | |
---|---|---|
committer | 2018-03-06 15:55:31 -0800 | |
commit | f5d5eb1851841abff74b2c2757c58988a5ccd3b1 (patch) | |
tree | d1442902f2e1831c8da85788ec7ff35edf2063c2 /openjdkjvmti/events.h | |
parent | f709ba5b7f5a3802c6e216117f1202d6ee0e4591 (diff) |
Remove FramePop trace listener if no outstanding events
Previously we would leave the JvmtiMethodTraceListener installed
forever if we even had a FramePop event requested. This was to prevent
any possible UAF issues with shadow-frames. This changes it so we will
check if there are any outstanding shadow-frames when the event is
disabled. If there are not any left we will remove it and remove the
deopts. This should improve performance after a frame-pop event is
used.
Bug: 74240081
Bug: 34414072
Test: ./test.py --host -j50
Test: Debug system-server a bit and use Step-Out.
Change-Id: I5fdb8ccce95ba51d6113df12e01bb158d210a5b2
Diffstat (limited to 'openjdkjvmti/events.h')
-rw-r--r-- | openjdkjvmti/events.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/openjdkjvmti/events.h b/openjdkjvmti/events.h index 8141eff88c..bf12cb191e 100644 --- a/openjdkjvmti/events.h +++ b/openjdkjvmti/events.h @@ -247,6 +247,9 @@ class EventHandler { private: void SetupTraceListener(JvmtiMethodTraceListener* listener, ArtJvmtiEvent event, bool enable); + // Specifically handle the FramePop event which it might not always be possible to turn off. + void SetupFramePopTraceListener(bool enable); + template <ArtJvmtiEvent kEvent, typename ...Args> ALWAYS_INLINE inline std::vector<impl::EventHandlerFunc<kEvent>> CollectEvents(art::Thread* thread, |