Integrated: 8358318: JFR: Tighten up PlatformTracer initialization

Aleksey Shipilev shade at openjdk.org
Tue Jun 3 08:32:58 UTC 2025


On Mon, 2 Jun 2025 11:19:52 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`

This pull request has now been integrated.

Changeset: 8674f491
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/8674f49127d75d20c074fb8c4f0736bfe190f8b8
Stats:     18 lines in 2 files changed: 12 ins; 5 del; 1 mod

8358318: JFR: Tighten up PlatformTracer initialization

Reviewed-by: egahlin

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

PR: https://git.openjdk.org/jdk/pull/25584


More information about the hotspot-jfr-dev mailing list