RFR: 8358003: KlassTrainingData initializer reads garbage holder [v4]
Aleksey Shipilev
shade at openjdk.org
Wed Jun 4 09:01:24 UTC 2025
On Wed, 4 Jun 2025 08:46:11 GMT, Igor Veresov <iveresov at openjdk.org> wrote:
>> Simplify KlassTrainingData constructor. The lines in question come from the old pre-CDS world. They are not needed anymore.
>
> Igor Veresov has updated the pull request incrementally with one additional commit since the last revision:
>
> More changes
Right off the bat, before I look at the rest of it: I don't think there is a need to introduce another OopStorage class just for these handles. We already see it would probably require touchups in other code that enumerates OopStorages. So instead, use `VM Global` one? I.e. do:
handle = OopHandle(Universe::vm_global(), obj);
Also I cannot spot where we clean these. Note that for `OopHandle`-s, you have to explicitly call `.release`, likely in `KlassTrainingData` destructor.
-------------
PR Review: https://git.openjdk.org/jdk/pull/25623#pullrequestreview-2895896625
More information about the hotspot-dev
mailing list