JRuby and JDK24 AOTCache experiment

ioi.lam at oracle.com ioi.lam at oracle.com
Thu Feb 13 18:36:25 UTC 2025


Which build of JDK 24 (or mainline) are you using? There's a recent 
change that turns on -XX:+AOTClassLinking automatically to take 
advantage of all JEP 483 optimizations (including the AOT-linking of 
lambdas)

https://bugs.openjdk.org/browse/JDK-8348752

If you're using an older JDK 24 build (earlier than JDK 24-b35), you 
might need to add -XX:+AOTClassLinking explicitly.

A good way for checking is with -Xlog:cds,class+load and see how many 
classes you are loading from CDS vs dynamically parsed.

Thanks

- Ioi

On 2/13/25 7:12 AM, Charles Oliver Nutter wrote:
> I figured folks here would be interested to see this experiment using 
> AOTCache with JRuby.
>
> https://gist.github.com/headius/1a5cfbc91ed8bacd194f1c592a90c275
>
> I just test the 'hello world' scenario that represents our baseline 
> startup, but AOT caching manages to beat the automatic AppCDS startup 
> by a bit. More/better training might help here I'm guessing?
>
> This is from the JRuby 10 branch (10-dev) on 
> https://github.com/jruby/jruby.git if anyone wants to play with it. 
> Just run `./mvnw` and then `bin/ruby` will work. We recently added 
> support for AutoCreateSharedArchive so it will use CDS by default. 
> Pass --nocache to disable that behavior.
>
> *Charles Oliver Nutter*
> /Architect and Technologist/
> Headius Enterprises
> https://www.headius.com
> headius at headius.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20250213/8854dec7/attachment.htm>


More information about the leyden-dev mailing list