[External] : Re: Removing -XX:+AOTClassLinking support for dynamic CDS archive

ioi.lam at oracle.com ioi.lam at oracle.com
Thu Sep 11 21:47:13 UTC 2025


Yes, I think we should also remove AOTClassLinking support for the 
static CDS archive. It's less pressing of an issue, as the static 
archive is very similar to the AOT cache.

Let's first remove from dynamic archive, and see if we get any pushback :-)

Thanks

- Ioi


On 9/10/25 2:00 PM, Ashutosh Mehra wrote:
> +1 for removing AOTClassLinking support for dynamic archives. One less 
> scenario to think of.
> Since we are adopting and advocating AOTCache based workflow, perhaps 
> we should remove support for AOTClassLinking with any of the older CDS 
> based workflows - static or dynamic archive.
> I am not sure if it would have any impact on the code base, but it 
> would keep the two workflows completely separate, making it easier to 
> reason about the future changes.
>
> Thanks,
> - Ashutosh Mehra
>
>
> On Wed, Sep 10, 2025 at 3:14 PM <ioi.lam at oracle.com> wrote:
>
>     I've filed https://bugs.openjdk.org/browse/JDK-8367366 to remove
>     -XX:+AOTClassLinking support for dynamic CDS archive. Any objections?
>
>     Background: we needed this for the old (and removed) "5 step
>     workflow"
>     in early Leyden development. And it somehow leaked into the mainline
>     when we upstreamed JEP 483.
>
>     However, most (if not all) current and future Leyden optimizations
>     will
>     depend on BOTH -XX:+AOTClassLinking and archive heap objects.
>     Because we
>     don't support archived heap objects in the dynamic archive, so it
>     won't
>     benefit from any of those optimization.
>
>     My main concerns are (1) code bloat, and (2) the chance of
>     introducing
>     bugs when we add new optimizations without sufficient testing for the
>     dynamic archive. I think I actually have one such bug in
>     `fixup_module_field_list()` in
>     https://github.com/openjdk/jdk/pull/26375
>     <https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/26375__;!!ACWV5N9M2RV99hQ!KXRq6nmINWx8yh798jb1bjWnWV2KPgNd3R0DtUvbSdnWY_RlHWEgFk1s500ggu23Mbgi0dpGkMvY2A$>
>
>     (preload classes from AOT cache).
>
>     Thanks
>
>     - Ioi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20250911/025776a6/attachment.htm>


More information about the leyden-dev mailing list