RFR: 8293187: Store initialized Enum classes in AOTCache [v3]
Ioi Lam
iklam at openjdk.org
Thu Sep 19 02:26:35 UTC 2024
On Wed, 18 Sep 2024 14:29:44 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
> I was actually referring to the missing aot-initialized check for the Fruit class. As it stands, this method initializes the classes required by the archive mirrors as the _runtime_default_subgraph_info has all the archived mirrors.
`_runtime_default_subgraph_info` is not recording the mirrors. It records all the classes of all the objects that can are reachable from the archived mirrors.
For example, if the following three classes are aot-initialized:
class A { static Object foo = new X(); }
class B { static Object foo = new Y(); }
class C { static Object foo = new Y(); }
`_runtime_default_subgraph_info` records `X` and `Y`. It doesn't record `A`, `B`, or `C`.
> But not all classes that have archived mirror are aot-initialized.
If a class is not AOT initialized, its mirror is filled with zeros (plus a few native pointers) so the mirror doesn't point to any object.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20958#discussion_r1766058990
More information about the hotspot-dev
mailing list