Skip to content
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

[GR-49965] [GR-51573] [GR-52422] Persist and reload analysis universe and shadow heap #8744

Merged
merged 8 commits into from
Apr 11, 2024

Conversation

graalvmbot
Copy link
Collaborator

Adds the PersistImageLayer option, which allows to save information of the AnalysisUniverse of an image in a layer-snapshot-{image-name}.json file that is stored in the artifacts path. The file format can be found at the top of ImageLayerLoader. The information currently persisted consists of the AnalysisTypes, AnalysisMethods, AnalysisFields and all the ImageHeapConstants from the shadow heap.

The information can then be reloaded in a subsequent image build using the option LoadImageLayer.

The type, method and field ids in the second image are the same as the first image. A part of the persisted constants are relinked, meaning they get matched to the corresponding hosted object in place of the constant that would be created in the new image. Those are the DynamicHub, interned String and Enum constants. All their child constants are also persisted constants, but most of them are not backed by an hosted object. Only a predefined subset of fields are relinked as well, using the value of the hosted object of the parent constant.

The field flags from the base image need to be persisted and loaded in the extension image as we will skip the analysis for most types and methods of the base image.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 10, 2024
@graalvmbot graalvmbot closed this Apr 11, 2024
@graalvmbot graalvmbot deleted the scoppey/GR-49965/persist-and-reload-image-heap branch April 11, 2024 07:34
@graalvmbot graalvmbot merged commit e9bed41 into master Apr 11, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants