-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8365823: Revert storing abstract and interface Klasses to non-class metaspace #27295
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
Conversation
|
/label assign @shipilev |
|
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
|
@coleenp 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 86 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 |
|
@coleenp
|
Webrevs
|
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.
First pass comments below.
Also, I looked at original change, and I wonder if we want to revert other changes as well. It looks to me they are fairly innocuous, TBH, so I have no strong opinion about them.
-
ChangingReverted already with JDK-8341649.final->abstractinInvokerBytecodeGenerator: ad10493?diff=unified#diff-3b05b61400e7766115409b3f508d839fb51e450423822252ab2e18543427c764L249-R249 -
JFR: ad10493?diff=unified#diff-d58d6d9783cb29084a15c42ecd7f59860a48be8bcfd9be0ee15a9d50209b576fR1-R160
-
Test: ad10493?diff=unified#diff-00138acd973f46c5f91674e5388ee82d2e7ed1b788ed551f34120cc761d228b7L1-R166
|
Re InvokerBytecodeGenerator: it was rolled back almost immediately after the original patch due to performance regressions. |
Co-authored-by: Aleksey Shipilëv <shipilev@amazon.de>
Co-authored-by: Aleksey Shipilëv <shipilev@amazon.de>
|
The JFR changes were a slight refactoring, so I don't think they need to be changed back. The ClassFileParser.is_abstract() function is now unused. Well spoltted. |
shipilev
left a comment
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 looks good to me, I have a few more questions:
| MetaspaceObj::Type type, TRAPS) throw() { | ||
| // Klass has its own operator new | ||
| assert(type != ClassType, "class has its own operator new"); | ||
| return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false, THREAD); |
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.
Question: now that ArrayKlass and InstanceKlass do not have ::new, the assert above is still valid? I am guessing all these inherit Klass::new?
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, all Klass allocation should call Klass::operator new(). Klass is derived from Metadata that's derived from MetaspaceObj. The Klass operator new hides the one in MetaspaceObj.
vnkozlov
left a comment
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.
Good.
This is not 1-to-1 back-out of #19157 . I assume it is because there were several additional follow up fixes.
Will 25u backport be the same?
|
Yes, this wasn't just a backout. I stayed away from the JFR code refactoring, and there were other fixes for hidden classes that are already in JDK 25. And we added then backported a diagnostic flag, that this change removes. |
|
Yes, this change should backport cleanly to JDK 25 pending approval. |
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 looks good. In hindsight kind of scary that there are no tests to change back. But all Metaspace tests sit either on a layer below Metaspace::allocate or test class loading, which sits above this layer.
Some tests that check expected memory levels in class space and non-class metaspace could now run into problems, since the ratio between these numbers should shift (total consumption should be about identical). Maybe not. We'll see it when we see it.
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java
Show resolved
Hide resolved
mgronlun
left a comment
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.
Commit: "Revert JFR changes from JDK-8338526 also." looks good.
Thanks
…on jvmci. Reran jvmci tests.
vnkozlov
left a comment
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.
Still good.
|
Thanks Vladimir for re-reviewing. |
|
Going to push as commit fa00b24.
Your commit was automatically rebased without conflicts. |
This change removes the optimization to not store abstract and interface Klass metadata to non-class metaspace. Now all Klass metadata is in the Klass metaspace. This is simpler and less bug prone, and didn't help with the limitation of classes that can be stored in class metaspace materially.
Tested with tier1-4.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27295/head:pull/27295$ git checkout pull/27295Update a local copy of the PR:
$ git checkout pull/27295$ git pull https://git.openjdk.org/jdk.git pull/27295/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27295View PR using the GUI difftool:
$ git pr show -t 27295Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27295.diff
Using Webrev
Link to Webrev Comment