On Thu, 7 May 2026 14:08:12 GMT, Markus Grönlund <[email protected]> wrote:

>> test/jdk/jdk/jfr/jvm/TestJdkEpochThrottle.java line 92:
>> 
>>> 90:             validate(secondRecording, 3);
>>> 91:             secondRecording.close();
>>> 92:             validate(firstRecording, 9);
>> 
>> I haven't seen a test that has two recordings in use at the same time. The 
>> event isn't explicitly enabled for secondRecording, is the nesting relevant 
>> here? Also does the stop + start guaranteed to bump the epoch?
>
> We have many JFR tests that start multiple, nested recordings. Since a 
> recording cannot turn off an event enabled by another recording, and there is 
> only one recording stream in total, the second recording inherits the enabled 
> event (the event setting is a union of 1 v 0), which means the event is also 
> enabled for the subsequent recording.
> 
> Start and stop are both implemented as rotations, and rotations use a 
> stop-the-world safepoint to bump the epoch.

I wasn't sure how it worked with concurrent recordings so your message is 
useful, thanks. I will note that I did read through the Recording API docs but 
couldn't find anything obvious that documents this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30922#discussion_r3202635148

Reply via email to