RFR: 8358318: JFR: Tighten up PlatformTracer initialization [v2]
Erik Gahlin
egahlin at openjdk.org
Mon Jun 2 17:38:53 UTC 2025
On Mon, 2 Jun 2025 17:28:32 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Started as SonarCloud complaint that MethodSetting.apply initializes a static field. But I think there is a larger problem here, which I completely missed during [JDK-8352738](https://bugs.openjdk.org/browse/JDK-8352738) review: the `PlatformTracer` initialization can technically run several times, AFAICS. This PR tightens up the initialization. It also allows us to call `ensureInitialized` from other places, if we ever find a need.
>>
>> Additional testing:
>> - [x] Linux x86_64 server fastdebug, `jdk_jfr`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Unsynchronized fix
> - Merge branch 'master' into JDK-8358318-jfr-platform-tracer-init
> - Fix
Marked as reviewed by egahlin (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/25584#pullrequestreview-2889374075
More information about the hotspot-jfr-dev
mailing list