[jdk18] RFR: 8274315: JFR: One closed state per file or stream

Markus Grönlund mgronlun at openjdk.java.net
Wed Dec 22 12:22:13 UTC 2021


On Tue, 21 Dec 2021 20:16:26 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> Hi,
> 
> This bug was filed to prevent intermittent failures, for example https://bugs.openjdk.java.net/browse/JDK-8268297, but turns out it didn't prevent that bug, but the problem stll exists.
> 
> Closed state is held in two places, both the ChunkParser and the EventStream. Since new instances of ChunkParser are created, where the closed stated is false initially, a thread may continue parsing longer than it should. 
> 
> With the fix, there is only one closed state per recording or stream.
> 
> A follow up fix for JDK 19 may be to move the ParserConfiguration functionality into ParserState. I tried it initially, but there are some corner cases, so I rather wait.
> 
> Testing: jdk/jdk/jfr
> 
> Thanks
> Erik

Looks good. Thanks.

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

Marked as reviewed by mgronlun (Reviewer).

PR: https://git.openjdk.java.net/jdk18/pull/62


More information about the hotspot-jfr-dev mailing list