-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
8257241: CDS should not handle disableEagerInitialization for archived lambda proxy classes #1542
8257241: CDS should not handle disableEagerInitialization for archived lambda proxy classes #1542
Conversation
…d lambda proxy classes
👋 Welcome back ccheung! A progress list of the required criteria for merging this PR into |
@calvinccheung The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
/label remove hotspot |
@calvinccheung |
@calvinccheung |
Webrevs
|
The change looks okay. Can you add a test to verify that it won't load from CDS archive if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I agree with Mandy that we need a test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@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:
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 56 new commits pushed to the
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 |
* from the archive. | ||
* @requires vm.cds | ||
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds | ||
* @compile ../../../../../jdk/java/lang/invoke/lambda/LambdaEagerInitTest.java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to make a copy of this test along side with this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make a copy and put it under the open/test/hotspot/jtreg/runtime/cds/appcds/test-classes
dir. I'd still need the @compile
and would be something like @compile test-classes/LambdaEagerInitTest.java
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @compile
can be avoiding by putting LambdaEagerInitTest into the @library
and referencing it as
private static final String mainClass = LambdaEagerInitTest.class.getName();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @library test-classes
works.
.shouldNotMatch(".cds.*Loaded.*lambda.*proxy") | ||
.shouldHaveExitValue(0); | ||
|
||
// run with archive without the -Djdk.internal.lambda.disableEagerInitialization=true property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion: make this test case in a separate testWithEagerInitializationEnabled
method. testImpl
can be renamed to testWithEagerInitializationDisabled
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also factored out the archive creation into the createArchiveWithEagerInitializationEnabled
method.
2. Modifications to LambdaEagerInit.java per review comments
*/ | ||
|
||
/** | ||
* @test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of LambdaEagerInit test. This does not need to be @test
and so the entire comment block can be removed.
If you want to verify, you could add a test case in LambdaEagerInit.java to run this main class without the CDS archive.
2. Add more test cases using the default CDS archive in LambdaEagerInit.java
/integrate |
@calvinccheung Since your change was applied there have been 56 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 3da30e9. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this change which includes:
If the
jdk.internal.lambda.disableEagerInitialization
property is enabled, theInnerClassLambdaMetafactory
will not involve CDS to archive lambda proxy classes or to find them from an archive.Not passing the
initialize
(same as!disableEagerInitialization
) toLambdaProxyClassArchive.find
and eventually to theJVM_LookupLambdaProxyClassFromArchive
function.Testing:
all cds/appcds tests locally on linux-x64
tiers 1 - 4 (in progress)
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1542/head:pull/1542
$ git checkout pull/1542