jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8360743: Enables regeneration of JLI holder classes for CDS static dump

Open calvinccheung opened this issue 4 months ago • 7 comments

This patch enables regeneration of JLI holder classes when dumping method handles, i.e. when dumping heap and aot linked classes. It also addresses an issue if the nest host of a class is excluded during dumping, the class should also be excluded.

Passed tiers 1 - 5 testing.


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issue

  • JDK-8360743: Enables regeneration of JLI holder classes for CDS static dump (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26007

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26007.diff

Using Webrev

Link to Webrev Comment

calvinccheung avatar Jun 26 '25 22:06 calvinccheung

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

bridgekeeper[bot] avatar Jun 26 '25 22:06 bridgekeeper[bot]

@calvinccheung This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8360743: Enables regeneration of JLI holder classes for CDS static dump

Reviewed-by: iklam, liach

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 20 new commits pushed to the master branch:

  • aa1911191cf8c2b855268a76baf0757909d66d1b: 8360867: CTW: Disable inline cache verification
  • 00adbbe5538ec5c26dc5bd17ca94cc29db9bc478: 8274051: Remove supports_vtime()/elapsedVTime()
  • c2d76f9844aadf77a0b213a9169a7c5c8c8f1ffb: 8361032: Problem list TestOnSpinWaitAArch64 until JDK-8360936 is fixed
  • ... and 17 more: https://git.openjdk.org/jdk/compare/8ea544c33fc502208577249fb83544f8d876bc17...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

openjdk[bot] avatar Jun 26 '25 22:06 openjdk[bot]

@calvinccheung The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

openjdk[bot] avatar Jun 26 '25 22:06 openjdk[bot]

/label remove hotspot

/label add hotspot-runtime

calvinccheung avatar Jun 26 '25 22:06 calvinccheung

@calvinccheung The hotspot label was successfully removed.

openjdk[bot] avatar Jun 26 '25 22:06 openjdk[bot]

@calvinccheung The hotspot-runtime label was successfully added.

openjdk[bot] avatar Jun 26 '25 22:06 openjdk[bot]

Webrevs

mlbridge[bot] avatar Jun 26 '25 23:06 mlbridge[bot]

Does this not require any change from the jlink/GenerateJLIClassesHelper side?

liach avatar Jun 27 '25 13:06 liach

Does this not require any change from the jlink/GenerateJLIClassesHelper side?

Do you mean ./java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java? The CDS class calls the generateHolderClasses() method. Do you think the method needs to be changed? If so, what would be your suggestions?

calvinccheung avatar Jun 27 '25 16:06 calvinccheung

Thanks for pointing that to me. I see it is done in LambdaFormInvokers::regenerate_holder_classes now. Everything looks good.

liach avatar Jun 27 '25 18:06 liach

Thanks @iklam @liach for the review.

/integrate

calvinccheung avatar Jun 30 '25 17:06 calvinccheung

Going to push as commit 1dda79cfab597782e0a7bb63af6dcc30aeff62d1. Since your change was applied there have been 20 commits pushed to the master branch:

  • aa1911191cf8c2b855268a76baf0757909d66d1b: 8360867: CTW: Disable inline cache verification
  • 00adbbe5538ec5c26dc5bd17ca94cc29db9bc478: 8274051: Remove supports_vtime()/elapsedVTime()
  • c2d76f9844aadf77a0b213a9169a7c5c8c8f1ffb: 8361032: Problem list TestOnSpinWaitAArch64 until JDK-8360936 is fixed
  • ... and 17 more: https://git.openjdk.org/jdk/compare/8ea544c33fc502208577249fb83544f8d876bc17...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Jun 30 '25 17:06 openjdk[bot]

@calvinccheung Pushed as commit 1dda79cfab597782e0a7bb63af6dcc30aeff62d1.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Jun 30 '25 17:06 openjdk[bot]