Hi all,
After looking at the code a bit more, I don't see a viable
way of really either:
- At notification disabling, remove all pop event
requests
- Enforcing that the current frame at depth is singled
out, if you disable and then pop that frame, the event is
destroyed with the frame so that a subsequent pop at that
depth no longer fires
Because of that, I'd recommend just changing the
documentation to highlight this, it might look a bit like
this:
--- old/src/share/vm/prims/jvmti.xml 2017-09-05 10:51:05.850810934 -0700
+++ new/src/share/vm/prims/jvmti.xml 2017-09-05 10:51:05.710811367 -0700
@@ -2907,7 +2907,7 @@
<function id="NotifyFramePop" num="20">
<synopsis>Notify Frame Pop</synopsis>
<description>
- When the frame that is currently at <paramlink id="depth"></paramlink>
+ When a frame currently at <paramlink id="depth"></paramlink>
is popped from the stack, generate a
<eventlink id="FramePop"></eventlink> event. See the
<eventlink id="FramePop"></eventlink> event for details.
@@ -2916,6 +2916,12 @@
<p/>
The specified thread must either be the current thread
or the thread must be suspended.
+ <p/>
+ Note: if the notification event is disabled and a frame at
+ <paramlink id="depth"></paramlink> is popped, no event is generated.
+ After re-enabling the notification event, the registered
+ <paramlink id="depth"></paramlink> is still active and will provoke an
+ event when a frame at <paramlink id="depth"></paramlink> is popped.
</description>
<origin>jvmdi</origin>
<capabilities>
Would someone want to review this and tell me if I should create a webrev for it? Or tell me hell no ;-)