RFR: 8365066: RecordingStream and RemoteRecordingStream do not terminate when the associated Recording is stopped or closed externally

Chihiro Ito cito at openjdk.org
Thu Aug 21 09:27:43 UTC 2025


Fix an issue where RecordingStream and RemoteRecordingStream do not stop when their underlying the local/remote recording stop. 

Introduce an internal EventSource abstraction to unify control across local (PlatformRecording) and remote (FlightRecorderMXBean) recordings, ensuring consistent propagation of stop/close and stop time to the consumer streams.

Tests updated to validate lifecycle consistency: 
Verifies that stopping/closing the underlying recording (local and remote) properly stops/closes the corresponding stream.

Test: jdk/jdk/jfr

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

Commit messages:
 - 8365066: RecordingStream and RemoteRecordingStream do not terminate when the associated Recording is stopped or closed externally

Changes: https://git.openjdk.org/jdk/pull/26710/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26710&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365066
  Stats: 648 lines in 7 files changed: 584 ins; 30 del; 34 mod
  Patch: https://git.openjdk.org/jdk/pull/26710.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26710/head:pull/26710

PR: https://git.openjdk.org/jdk/pull/26710


More information about the hotspot-jfr-dev mailing list