RFR: 8316454: JFR break locale settings

Erik Gahlin egahlin at openjdk.org
Fri Dec 8 07:28:23 UTC 2023


On Fri, 8 Dec 2023 05:44:39 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Could I have a review of PR that prevents locale settings from not working.
>> 
>> Testing: jdk/jdk/jfr/* + jdk/java/util/Local/ with -XX:FlightRecorderOptions=repository=jfrrep
>> 
>> Thanks
>> Erik
>
> src/jdk.jfr/share/classes/jdk/jfr/internal/util/ValueFormatter.java line 123:
> 
>> 121:         }
>> 122:         return NUMBER_FORMAT;
>> 123:     }
> 
> Is this initialization thread-safe?

It should be fine if we end up with more than one object. In practise, only one thread will access the field, the Attach thread when using jcmd, or the main thread when using the jfr tool. In theory, you could do 'jcmd <pid> JFR.view' on a 'jfr view' process, but at worst, we will get two objects.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17018#discussion_r1420036071


More information about the hotspot-jfr-dev mailing list