Skip to content

JITServer AOT cache array class support #19138

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

Merged
merged 1 commit into from
May 16, 2024

Conversation

AlexeyKhrabrov
Copy link
Contributor

@AlexeyKhrabrov AlexeyKhrabrov commented Mar 13, 2024

This draft PR implements object array class support for JITServer AOT cache. Currently untested.

This PR enables AOT cache serialization and load for methods that refer to array classes in their relocation and validation records, specifically object arrays and multidimensional primitive arrays. Since such classes share the same ROMClass named [L, we disambiguate them in the AOT cache by using the full array class signature instead of the ROMClass name. We build the ROMClass hash for an array class by combining the ROMClass hash of the [L object array class, the ROMClass hash of the base component class, and the number of array dimensions.

@AlexeyKhrabrov
Copy link
Contributor Author

@mpirvu @cjjdespres

@AlexeyKhrabrov AlexeyKhrabrov force-pushed the aotcache_object_arrays branch 2 times, most recently from 787ed28 to 9a27425 Compare April 26, 2024 13:30
@mpirvu mpirvu self-assigned this Apr 26, 2024
@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Apr 26, 2024
Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

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

I submitted a partial review of the code.

@AlexeyKhrabrov AlexeyKhrabrov force-pushed the aotcache_object_arrays branch 3 times, most recently from 737768b to b19a4ea Compare May 13, 2024 15:58
@AlexeyKhrabrov AlexeyKhrabrov changed the title (WIP) JITServer AOT cache object array class support JITServer AOT cache array class support May 13, 2024
@AlexeyKhrabrov AlexeyKhrabrov marked this pull request as ready for review May 13, 2024 16:02
@AlexeyKhrabrov AlexeyKhrabrov requested a review from dsouzai as a code owner May 13, 2024 16:02
@AlexeyKhrabrov
Copy link
Contributor Author

@mpirvu This PR is ready for review now.

@AlexeyKhrabrov AlexeyKhrabrov force-pushed the aotcache_object_arrays branch from b19a4ea to d545c1f Compare May 13, 2024 23:27
Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

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

Looks good overall. I mostly have some questions and some requests for comments.

@mpirvu
Copy link
Contributor

mpirvu commented May 16, 2024

jenkins test sanity xlinuxjit,zlinuxjit,alinux64jit jdk21

This commit enables AOT cache serialization and load for methods that
refer to array classes in their relocation and validation records,
specifically object arrays and multidimensional primitive arrays. Since
such classes share the same ROMClass named "[L", we disambiguate them
in the AOT cache by using the full array class signature instead of the
ROMClass name. We build the ROMClass hash for an array class by
combining the ROMClass hash of the "[L" object array class, the ROMClass
hash of the base component class, and the number of array dimensions.

Signed-off-by: Alexey Khrabrov <[email protected]>
@AlexeyKhrabrov
Copy link
Contributor Author

The tests have passed: https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/5481/. I'll force push the remaining changes now, which are only additional comments to clarify the points raised in the review.

@AlexeyKhrabrov AlexeyKhrabrov force-pushed the aotcache_object_arrays branch from d545c1f to f31c509 Compare May 16, 2024 18:37
@mpirvu
Copy link
Contributor

mpirvu commented May 16, 2024

Since tests have passed, I am merging this PR.

@mpirvu mpirvu merged commit 5674d7c into eclipse-openj9:master May 16, 2024
@mpirvu
Copy link
Contributor

mpirvu commented May 16, 2024

I should have officially approved this PR. For the record, the fact that I have merged it means that I have approved it.

@AlexeyKhrabrov AlexeyKhrabrov deleted the aotcache_object_arrays branch May 16, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants