-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8265696: Move CDS sources to src/hotspot/shared/cds #3610
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
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
/label remove serviceability |
@iklam |
metaspaceShared_$(HOTSPOT_TARGET_CPU).cpp \ | ||
metaspaceShared_$(HOTSPOT_TARGET_CPU_ARCH).cpp \ | ||
sharedClassUtil.cpp \ | ||
sharedPathsMiscInfo.cpp \ |
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.
Removed obsolete files that no longer exist.
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.
Thank you!
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 don't suppose we can just exclude the new directory rather than listing individual files?
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. Now all files under share/cds are excluded. I needed to move compactHashtable.cpp back to its old location since a little of it is used even when CDS is not used.
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.
That's indeed a better idea.
@@ -39,7 +39,6 @@ | |||
#include "logging/log.hpp" | |||
#include "logging/logStream.hpp" | |||
#include "memory/allocation.inline.hpp" | |||
#include "memory/filemap.hpp" | |||
#include "oops/oop.inline.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.
Removed some unnecessary inclusions.
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.
Build changes look good.
metaspaceShared_$(HOTSPOT_TARGET_CPU).cpp \ | ||
metaspaceShared_$(HOTSPOT_TARGET_CPU_ARCH).cpp \ | ||
sharedClassUtil.cpp \ | ||
sharedPathsMiscInfo.cpp \ |
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.
Thank you!
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.
Hi Ioi,
Moving these files to their own directory is fine, but all the moved headers need further adjustments for the include guards.
Thanks,
David
metaspaceShared_$(HOTSPOT_TARGET_CPU).cpp \ | ||
metaspaceShared_$(HOTSPOT_TARGET_CPU_ARCH).cpp \ | ||
sharedClassUtil.cpp \ | ||
sharedPathsMiscInfo.cpp \ |
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 don't suppose we can just exclude the new directory rather than listing individual files?
@@ -25,7 +25,7 @@ | |||
#ifndef SHARE_MEMORY_ARCHIVEUTILS_INLINE_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.
The header file include guards all need updating for the new path.
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.
#include "memory/memRegion.hpp" | ||
#include "memory/virtualspace.hpp" | ||
#include "oops/oop.hpp" | ||
#include "utilities/exceptions.hpp" | ||
#include "utilities/macros.hpp" | ||
#include "utilities/resourceHash.hpp" | ||
|
||
#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.
I have to wonder who is including this file and why, if CDS is not enabled.
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.
E.g., jvm.cpp includes dynamicArchive.hpp, but only uses its declarations inside INCLUDE_CDS blocks. It would be too verbose to do this in jvm.cpp
#if INCLUDE_CDS
#include "cds/dynamicArchive.hpp"
#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.
We routinely do that for other INCLUDE_X features.
…le.cpp cannot be excluded since a bit of it is used even when CDS is disabled
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.
Hi @iklam,
this is a very welcome change!
Nothing much to add to what David wrote (include guards need renaming).
Apart from that, I was surprised that no gtests needed to be adapted, but seems cds has no gtests?
I tested building without cds, works fine.
Thanks for doing this!
If you fix the include guards, this is fine by me.
..Thomas
Hi Thomas, thanks for the review. You're right that we don't have any gtests .... that should be fixed at some point. |
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.
Thanks,
David
metaspaceShared_$(HOTSPOT_TARGET_CPU).cpp \ | ||
metaspaceShared_$(HOTSPOT_TARGET_CPU_ARCH).cpp \ | ||
sharedClassUtil.cpp \ | ||
sharedPathsMiscInfo.cpp \ |
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.
That's indeed a better idea.
@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 |
Thanks @tstuefe @erikj79 @dholmes-ora for the review. |
The number of CDS source files have grown significantly. To improve modularity, the following files should be moved a new directory, src/hotspot/share/cds.
Testing with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3610/head:pull/3610
$ git checkout pull/3610
Update a local copy of the PR:
$ git checkout pull/3610
$ git pull https://git.openjdk.java.net/jdk pull/3610/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3610
View PR using the GUI difftool:
$ git pr show -t 3610
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3610.diff