Skip to content

8350550: Preload classes from AOT cache during VM bootstrap #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: premain
Choose a base branch
from

Conversation

iklam
Copy link
Member

@iklam iklam commented Jun 24, 2025

This is still work-in-progress


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8350550: Preload classes from AOT cache during VM bootstrap (Enhancement - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/leyden.git pull/81/head:pull/81
$ git checkout pull/81

Update a local copy of the PR:
$ git checkout pull/81
$ git pull https://git.openjdk.org/leyden.git pull/81/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 81

View PR using the GUI difftool:
$ git pr show -t 81

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/leyden/pull/81.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 24, 2025

👋 Welcome back iklam! A progress list of the required criteria for merging this PR into premain will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 24, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

Copy link
Collaborator

@rose00 rose00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work. This is a Big Transaction that inhales the initial set of classes. I see it scales all the way up to the app class loader. Very cool, ship it!

Some documentation-related comments follow:

I noticed patching of the relation of class mirror to module. This is present even if the full module graph is being used. Wouldn’t it be possible to pre-configure that in the AOT cache, and only do the patching if there is a non-default module graph? Or am I misreading the code? (I’m looking at restore_module_of_preloaded_classes etc.)

The restore_unshareable_info call in SystemDictionary::preload_class is used for other miscellanous links from the class, similar to the module links I just mentioned. Same question, I guess: Why are these not pre-materialized in the AOT cache? They are “unshareable” for a reason; where is that reason documented?

And then another question: Why not handle the module linkage at the same place as the package linkage and the PD linkage? Possible answer: The module graph gets created last, so it must be back-patched. Where is that fact documented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants