Skip to content

8381561: G1: Cleanup patch in preparation for eager reclamation of flat arrays#30549

Open
stefank wants to merge 1 commit intoopenjdk:masterfrom
stefank:8381561_cleanup_for_eager_reclaim_of_flat_arrays
Open

8381561: G1: Cleanup patch in preparation for eager reclamation of flat arrays#30549
stefank wants to merge 1 commit intoopenjdk:masterfrom
stefank:8381561_cleanup_for_eager_reclaim_of_flat_arrays

Conversation

@stefank
Copy link
Copy Markdown
Member

@stefank stefank commented Apr 2, 2026

During the review of openjdk/valhalla#2255 there were some discussion about the code structure that was being proposed. To not make structural changes like this in the valhalla branch, I'm going to propose the changes to openjdk/jdk and then the valhalla changes can be kept to a minimum.

This is what the valhalla changes would look like:
stefank/valhalla@lworld_g1_eager_baseline...stefank:valhalla:lworld_g1_eager

WDYT?


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-8381561: G1: Cleanup patch in preparation for eager reclamation of flat arrays (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30549

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 2, 2026

👋 Welcome back stefank! A progress list of the required criteria for merging this PR into master 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
Copy Markdown

openjdk bot commented Apr 2, 2026

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

8381561: G1: Cleanup patch in preparation for eager reclamation of flat arrays

Reviewed-by: ayang

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

  • a506853: 8374020: Inconsistent handling of type updates in typeWithAnnotations
  • fa5ec62: 8378950: Repeated warnings when annotation processing is happening

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Apr 2, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 2, 2026

@stefank The following label will be automatically applied to this pull request:

  • hotspot-gc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 2, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 2, 2026

Webrevs

size_t initial_chunk_size = _partial_array_splitter.start(_task_queue, obj_array, nullptr, array_length);

// Mark objArray klass metadata
if (_cm_oop_closure->do_metadata()) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This check has been removed. Marking closures should follow the metadata and there's no need to check if it should.

}

size_t G1CMTask::start_partial_array_processing(oop obj) {
size_t G1CMTask::start_partial_array_processing(objArrayOop obj) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe the arg name can be obj_array to emphasize that it's an objArray.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Maybe.

I prefer obj since it is a more common name. It seems like only this function and its counter part in the full GC named this obj_array. There's almost 50 occurrences that just call them obj.

I also don't like giving local variables multi-word names unless it really helps with the readability and understanding of the function. I don't think it does in this case.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 2, 2026
@stefank
Copy link
Copy Markdown
Member Author

stefank commented Apr 2, 2026

I've run this through tier1-3.

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

Labels

hotspot-gc hotspot-gc-dev@openjdk.org ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants