RFR: 8259354 Fix race condition in AbstractEventStream.nextThreadName

Erik Gahlin egahlin at openjdk.java.net
Thu Jan 7 04:25:04 UTC 2021


On Thu, 7 Jan 2021 03:46:45 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

>> The result of `AtomicLong.incrementAndGet()` is used rather than
>> incrementing the long and reading its value separately. The
>> previous approach allowed for the static counter to be incremented
>> several times before any caller read the value, resulting in
>> several callers with the same value.
>
> Marked as reviewed by egahlin (Reviewer).

I created a tricket:

https://bugs.openjdk.java.net/browse/JDK-8259354

Have you run the tests in test/jdk/jdk/jfr?

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

PR: https://git.openjdk.java.net/jdk/pull/1871


More information about the hotspot-jfr-dev mailing list