-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8292891: ifdef-out some CDS-only functions #10010
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
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 have the largest if blocks possible.
@iklam 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
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.
Thanks for the cleanup. One comment below.
@@ -401,6 +401,7 @@ void Method::metaspace_pointers_do(MetaspaceClosure* it) { | |||
NOT_PRODUCT(it->push(&_name);) | |||
} | |||
|
|||
#if INCLUDE_CDS |
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.
Do you need to ifdef out the declaration in method.hpp?
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.
Fixed. I also found out that Method::restore_unshareable_info
also needed to be ifdef'ed out.
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.
Updates look good.
src/hotspot/share/oops/klass.hpp
Outdated
@@ -569,6 +572,7 @@ class Klass : public Metadata { | |||
return true; | |||
} | |||
} | |||
#endif |
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.
Can you add an // INCLUDE_CDS here? If they're more than 10 lines apart, uncommented endifs can be really confusing. This one is sort of borderline far away. Thanks.
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.
Fixed.
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 a bit of a slippery slope. We have things like NOT_CDS_RETURN to avoid the need to use ifdef INCLUDE_CDS
at the callsites. If you now ifdef the call sites you don't need NOT_CDS_RETURN. Conversely if you are still using NOT_CDS_RETURN then why didn't you ifdef the callsites?
src/hotspot/share/oops/method.hpp
Outdated
void remove_unshareable_info() NOT_CDS_RETURN; | ||
void restore_unshareable_info(TRAPS) NOT_CDS_RETURN; |
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.
Surely these should ifdef'd out not stubbed out? The callers of these should also be in INCLUDE_CDS blocks.
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.
Fixed.
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.
Thanks for the updates.
…ifdef-out-some-cds-functions
Thanks @calvinccheung @coleenp @dholmes-ora for the review! |
Going to push as commit 40b0ed5. |
Some CDS functions are always compiled, even when CDS is not enabled (e.g., for the minimal VM).
This RFE puts some of the obvious ones inside
#if INCLUDE_CDS
blocks.Note: my goal is not to make the minimal VM as small as possible. But rather, I don't want to put
#if INCLUDE_CDS
inside each of those functions that access a CDS-only feature. (E.g.,ConstantPoolCache::save_for_archive
, which accesses_initial_entries
, which is declared only when CDS is enabled).Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10010/head:pull/10010
$ git checkout pull/10010
Update a local copy of the PR:
$ git checkout pull/10010
$ git pull https://git.openjdk.org/jdk pull/10010/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10010
View PR using the GUI difftool:
$ git pr show -t 10010
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10010.diff