On Thu, 9 May 2024 14:29:13 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> Erik Gahlin has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move methods > > src/java.base/share/classes/jdk/internal/event/JFRTracing.java line 51: > >> 49: field.setAccessible(true); >> 50: field.setBoolean(null, true); >> 51: } > > Using reflection with `Field` seems expedient - a more modern way could be to > use `VarHandle` but I guess it would require more setup to obtain a `Lookup` > with the proper capabilities? The field is only used once and a VarHandle implementation loads three additional classes during startup and in my measurements add about 0.6 ms to startup. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19129#discussion_r1595627039