RFR: 8352251: Implement JEP 518: JFR Cooperative Sampling [v33]

Markus Grönlund mgronlun at openjdk.org
Thu May 22 15:36:59 UTC 2025


On Wed, 21 May 2025 22:24:08 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> > > We can escape here before `leave_jfr_critical_section`:
> > > https://github.com/openjdk/jdk/blob/d3aed1e7365d7934e439fff3956ae2ca4b5d4269/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp#L645
> > > 
> > > Is that ok for exceptions?
> > 
> > 
> > Need to check but might need a leave_critical section in InterpreterRuntime::throw_delayed_StackOverflowError.
> 
> Will also, again, study in detail JVMTI PopFrame and ForceEarlyReturn to ensure it plays with the new model.

Concluded that we can release the critical section before throwing DelayedStackOverflow.  The frame is set as the ljf, the thread enters into state thread in VM (unsampleable) , and throws. This throw will eventually end up in InterpreterRuntime::exception_handler_for_exception(). The choosen continuation points are InterpreterRuntime::remove_activation() (i.e. re-enter).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24296#issuecomment-2901685494


More information about the hotspot-jfr-dev mailing list