Skip to content

Conversation

iklam
Copy link
Member

@iklam iklam commented Aug 30, 2025

This PR is one (of many) steps in JDK-8366473 (Refactor CDS source code with new AOT terminology):

Rename this class to with a naming convention that's consistent with other new AOT classes such as AOTClassLinker.

All changes are mechanical text replacement. Headers are resorted alphabetically.


Progress

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

Issue

  • JDK-8366475: Rename MetaspaceShared class to AOTMetaspace (Sub-task - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27017

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2025

👋 Welcome back iklam! A progress list of the required criteria for merging this PR into pr/27016 will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Aug 30, 2025

@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:

8366475: Rename MetaspaceShared class to AOTMetaspace

Reviewed-by: kvn, asmehra

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 13 new commits pushed to the master branch:

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
Copy link

openjdk bot commented Aug 30, 2025

@iklam The following labels will be automatically applied to this pull request:

  • hotspot
  • serviceability

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.

@mlbridge
Copy link

mlbridge bot commented Aug 30, 2025

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

@vnkozlov
Copy link
Contributor

@stefank also asked about INCLUDE_CDS to replace it with INCLUDE_AOT. Should we do this?

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

@@ -24,7 +24,7 @@
*/

#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "cds/aotMetaspace.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are few places, like this, where the header files are no longer in sorted order. Can you please update them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -23,7 +23,7 @@
*/

#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "cds/aotMetaspace.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header files are not sorted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -3504,7 +3504,7 @@ JVM_ENTRY(void, JVM_DumpClassListToFile(JNIEnv *env, jstring listFileName))
ResourceMark rm(THREAD);
Handle file_handle(THREAD, JNIHandles::resolve_non_null(listFileName));
char* file_name = java_lang_String::as_utf8_string(file_handle());
MetaspaceShared::dump_loaded_classes(file_name, THREAD);
AOTMetaspace::dump_loaded_classes(file_name, THREAD);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this file include aotMetaspace.hpp directly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -23,7 +23,7 @@
*/

#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "cds/aotMetaspace.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

headers are not sorted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -27,7 +27,7 @@
#include "cds/cdsConstants.hpp"
#include "cds/filemap.hpp"
#include "cds/heapShared.hpp"
#include "cds/metaspaceShared.hpp"
#include "cds/aotMetaspace.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header files are not sorted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -448,7 +448,7 @@ void before_exit(JavaThread* thread, bool halt) {
ClassListWriter::write_resolved_constants();

if (CDSConfig::is_dumping_preimage_static_archive()) {
MetaspaceShared::preload_and_dump(thread);
AOTMetaspace::preload_and_dump(thread);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this file include aotMetaspace.hpp directly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -28,7 +28,7 @@
#include "cds/cds_globals.hpp"
#include "cds/cdsConfig.hpp"
#include "cds/heapShared.hpp"
#include "cds/metaspaceShared.hpp"
#include "cds/aotMetaspace.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header files are not sorted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@openjdk-notifier openjdk-notifier bot changed the base branch from pr/27016 to master September 4, 2025 04:53
@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout 8366475-rename-metaspace-shared-to-aot-metaspace
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Sep 4, 2025

@iklam this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 8366475-rename-metaspace-shared-to-aot-metaspace
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Sep 4, 2025

⚠️ @iklam This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Sep 4, 2025
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Sep 4, 2025
Copy link
Contributor

@ashu-mehra ashu-mehra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ashu-mehra
Copy link
Contributor

@iklam thanks for addressing the comments.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 4, 2025
@iklam
Copy link
Member Author

iklam commented Sep 4, 2025

Thanks @vnkozlov @ashu-mehra for the review
/integrate

@openjdk
Copy link

openjdk bot commented Sep 4, 2025

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 4, 2025
@openjdk openjdk bot closed this Sep 4, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 4, 2025
@openjdk
Copy link

openjdk bot commented Sep 4, 2025

@iklam Pushed as commit f90d520.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants