On Sat, 20 Sep 2025 01:23:25 GMT, Ioi Lam <[email protected]> wrote: > > @iklam Reading up the description of the bug tracker, it seems we are > > trying to find out more opportunities to AOT initialize classes than the > > current state. Is that correct? I may be missing something here, why not > > "force initialize" classes annotated with `AOTSafeClassInitializer` in > > `AOTMetaspace::try_link_class`, instead of introducing new annotation? > > Wouldn't that serve the same purpose? And I think we also need to track the > > classes that are actually initialized in the training phase, and apply > > "force initialization" only on that subset. Otherwise we can end up in > > situation where a classes is loaded and not initialized in training phase, > > but still gets AOT initialized because it is annotated with `AOTInitialize`. > > I think this is a better alternative. I will fix the implementation to do > what you described (by tracking the set of initialized classes in > finalImageRecipes..cpp). > > To avoid confusion, I will post a separate PR.
I have created an alternative PR. https://github.com/openjdk/jdk/pull/27402. @adinn @ashu-mehra @liach please take a look. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27024#issuecomment-3315384179
