RFR: 8331876: JFR: Move file read and write events to java.base [v3]
Alan Bateman
alanb at openjdk.org
Fri May 17 09:24:03 UTC 2024
On Sun, 12 May 2024 13:35:42 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
> I guess it's not 100% safe if the JIT decides to store the read value elsewhere over several event checks, but it seems unlikely. Event settings checks (i.e., Event::isEnabled()) have always used plain reads, so it is not more unreliable than any other event.
>
> I'm fine with using a volatile too. I used it for the exception events, but I now think a plain write/read of jfrTracing is safe for all practical purposes.
I'd prefer not introduce another volatile read into all these call paths. As you say, the issue has always been there so maybe it's okay for now and it can be examined later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19129#discussion_r1604619014
More information about the core-libs-dev
mailing list