[jdk18] RFR: 8274315: JFR: One closed state per file or stream
Erik Gahlin
egahlin at openjdk.java.net
Wed Dec 22 03:01:51 UTC 2021
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
-------------
Commit messages:
- Initial
Changes: https://git.openjdk.java.net/jdk18/pull/62/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=62&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274315
Stats: 63 lines in 6 files changed: 41 ins; 1 del; 21 mod
Patch: https://git.openjdk.java.net/jdk18/pull/62.diff
Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/62/head:pull/62
PR: https://git.openjdk.java.net/jdk18/pull/62
More information about the hotspot-jfr-dev
mailing list