RFR: 8346143: add ClearAllFramePops function to speedup debugger single stepping in some cases [v2]
Chris Plummer
cjplummer at openjdk.org
Tue Dec 17 21:40:36 UTC 2024
On Tue, 17 Dec 2024 17:35:52 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> src/hotspot/share/interpreter/interpreterRuntime.cpp line 580:
>>
>>> 578: // notify debugger of an exception catch
>>> 579: // (this is good for exceptions caught in native methods as well)
>>> 580: if (JvmtiExport::can_post_on_exceptions() || JvmtiExport::can_post_frame_pop()) {
>>
>> This doesn't seem like it is related to ClearAllFramePops.
>
> Yes, it does not relate to the `ClearAllFramePops` directly. But it is needed for correctness of the `NotifyFramePop`. I do not feel it is worth to separate this change.
So this is a long standing bug hidden by the fact that if `can_post_frame_pop()` is true, then so is `can_post_on_exceptions()`:
JvmtiExport::set_can_post_on_exceptions(
avail.can_generate_exception_events ||
avail.can_generate_frame_pop_events ||
avail.can_generate_method_exit_events);
JvmtiExport::set_can_post_frame_pop(avail.can_generate_frame_pop_events);
Or you could argue that the existing code is correct because it already captures `can_post_frame_pop()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22744#discussion_r1889259920
More information about the hotspot-dev
mailing list