Skip to content

Conversation

@LizBing
Copy link
Contributor

@LizBing LizBing commented Apr 20, 2024

follow up 8267941


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-8330694: Rename 'HeapRegion' to 'G1HeapRegion' (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18871

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 20, 2024

👋 Welcome back LizBing! 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

openjdk bot commented Apr 20, 2024

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

8330694: Rename 'HeapRegion' to 'G1HeapRegion'

Reviewed-by: cjplummer, kbarrett, tschatzl

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:

  • 05f13e7: 8329667: [macos] Issue with JTree related fix for JDK-8317771
  • 7bf1989: 8320575: generic type information lost on mandated parameters of record's compact constructors
  • 253508b: 8332303: Better JMX interoperability with older JDKs, after removing Subject Delegation
  • ebc520e: 8332841: GenShen: Pull shared members from control thread into common base class
  • 236432d: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook
  • b3b3366: 8332631: Update nsk.share.jpda.BindServer to don't use finalization
  • f66a586: 8332641: Update nsk.share.jpda.Jdb to don't use finalization
  • cd3e4c0: 8326734: text-decoration applied to lost when mixed with or
  • c2cca2a: 8330647: Two CDS tests fail with -UseCompressedOops and UseSerialGC/UseParallelGC
  • 6d2aeb8: 8332745: Method::is_vanilla_constructor is never used
  • ... and 3 more: https://git.openjdk.org/jdk/compare/6a35311468222f9335b43d548df2ecb80746b389...master

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@plummercj, @kimbarrett, @tschatzl) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title 8330694 8330694: Rename 'HeapRegion' to 'G1HeapRegion' Apr 20, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 20, 2024
@openjdk
Copy link

openjdk bot commented Apr 20, 2024

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

  • graal
  • 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.

@openjdk openjdk bot added graal graal-dev@openjdk.org serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Apr 20, 2024
@LizBing
Copy link
Contributor Author

LizBing commented Apr 20, 2024

/cc hotspot-gc

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Apr 20, 2024
@openjdk
Copy link

openjdk bot commented Apr 20, 2024

@LizBing
The hotspot-gc label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Apr 20, 2024

Copy link
Contributor

@plummercj plummercj left a comment

Choose a reason for hiding this comment

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

Functionally the SA changes look good, but I pointed out a few other places that you might also want to consider doing renames for.

Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

So much scrolling :)

Looks good. Just a few very minor nits for which I don't need to re-review.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 20, 2024
Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Indentation issues. I will run the higher tier SA tests just for verification.

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

There are still more classes related to HeapRegion that need the G1 prefix. Not entirely sure they should be changed with this change (probably not exhaustive) but it would be desirable to change them as well rather sooner than later:

HeapRegionClosure
HeapRegionRange
HeapRegionIndexClosure
HeapRegionRemSet
HeapRegionSetBase
HeapRegionSetChecker
HeapRegionSet
FreeRegionListIterator
FreeRegionList

@tschatzl
Copy link
Contributor

mach5 higher tier SA tests are fine.
What are your plans for the remaining SA renames (would highly recommend to add) and the G1HeapRegion related helper classes?

@kimbarrett
Copy link

mach5 higher tier SA tests are fine. What are your plans for the remaining SA renames (would highly recommend to add) and the G1HeapRegion related helper classes?

I suggest the related helper classes be done in further followups, not make this change even larger.

@tschatzl
Copy link
Contributor

mach5 higher tier SA tests are fine. What are your plans for the remaining SA renames (would highly recommend to add) and the G1HeapRegion related helper classes?

I suggest the related helper classes be done in further followups, not make this change even larger.

Fine with me, will file an issue about the helper classes.

Copy link
Contributor

@plummercj plummercj left a comment

Choose a reason for hiding this comment

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

In SA I see references to heapRegionIterate() that possibly should be renamed.

I noticed that the HeapRegionManager and HeapRegionClosure classes were not renamed (in the hotspot source). Is this intentional or an oversite?

@LizBing
Copy link
Contributor Author

LizBing commented May 11, 2024

In SA I see references to heapRegionIterate() that possibly should be renamed.

I noticed that the HeapRegionManager and HeapRegionClosure classes were not renamed (in the hotspot source). Is this intentional or an oversite?

OK, I will do all the SA part here. However, I do think that the other classes named 'HeapRegion*' in the hotspot source should be dealt with in follow-up PRs.

Copy link
Contributor Author

@LizBing LizBing left a comment

Choose a reason for hiding this comment

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

Should we also rename 'HeapRegionType' to 'G1HeapRegionType', then rename the current 'G1HeapRegionType' to 'G1 HeapRegionTypeEnum'?

Comment on lines 113 to 131

private Iterator<HeapRegion> heapRegionIterator() {
private Iterator<G1HeapRegion> heapRegionIterator() {
return hrm().heapRegionIterator();
}

public void heapRegionIterate(HeapRegionClosure hrcl) {
Iterator<HeapRegion> iter = heapRegionIterator();
public void heapRegionIterate(G1HeapRegionClosure hrcl) {
Iterator<G1HeapRegion> iter = heapRegionIterator();
while (iter.hasNext()) {
HeapRegion hr = iter.next();
G1HeapRegion hr = iter.next();
hrcl.doHeapRegion(hr);
}
}

public HeapRegion heapRegionForAddress(Address addr) {
Iterator<HeapRegion> iter = heapRegionIterator();
public G1HeapRegion heapRegionForAddress(Address addr) {
Iterator<G1HeapRegion> iter = heapRegionIterator();
while (iter.hasNext()) {
HeapRegion hr = iter.next();
G1HeapRegion hr = iter.next();
if (hr.isInRegion(addr)) {
return hr;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since these three methods are G1 specific, I'd prefer not to add the 'g1' prefix.

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

I'm good with leaving the heapRegionIterator() method name as is, but please make sure that @plummercj is good with this too.

@plummercj
Copy link
Contributor

I noticed that the HeapRegionManager and HeapRegionClosure classes were not renamed (in the hotspot source). Is this intentional or an oversite?

OK, I will do all the SA part here. However, I do think that the other classes named 'HeapRegion*' in the hotspot source should be dealt with in follow-up PRs.

I think there was a misunderstanding here. I was not asking you to rename these in SA. I was asking why they were not renamed in hotspot. If you want to do them in a follow-up then that is ok, but both hotspot and SA should be done together. So that means either undoing the most recent SA change or applying the same rename change to hotspot.

@plummercj
Copy link
Contributor

Should we also rename 'HeapRegionType' to 'G1HeapRegionType', then rename the current 'G1HeapRegionType' to 'G1 HeapRegionTypeEnum'?

For this PR the SA renames should match the hotspot renames. It looks like you have not renamed this in hotspot yet so it should not be renamed in SA either.

@openjdk
Copy link

openjdk bot commented May 18, 2024

@LizBing Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

// before dumping the string table. That means the heap should contain no
// humongous regions.
dumpOutput.shouldNotMatch("gc,region,cds. HeapRegion 0x[0-9a-f]* HUM");
dumpOutput.shouldNotMatch("gc,region,cds. G1HeapRegion 0x[0-9a-f]* HUM");
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a minor nit. I noticed a pre-existing typo on line 87 above. It says "kelp" instead of "kept". Can you fix it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Still good imo

@LizBing
Copy link
Contributor Author

LizBing commented May 24, 2024

thanks for the review!
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label May 24, 2024
@openjdk
Copy link

openjdk bot commented May 24, 2024

@LizBing
Your change (at version 01f06d4) is now ready to be sponsored by a Committer.

Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

Still looks good.

@kimbarrett
Copy link

/sponsor

@openjdk
Copy link

openjdk bot commented May 25, 2024

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

  • 05f13e7: 8329667: [macos] Issue with JTree related fix for JDK-8317771
  • 7bf1989: 8320575: generic type information lost on mandated parameters of record's compact constructors
  • 253508b: 8332303: Better JMX interoperability with older JDKs, after removing Subject Delegation
  • ebc520e: 8332841: GenShen: Pull shared members from control thread into common base class
  • 236432d: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook
  • b3b3366: 8332631: Update nsk.share.jpda.BindServer to don't use finalization
  • f66a586: 8332641: Update nsk.share.jpda.Jdb to don't use finalization
  • cd3e4c0: 8326734: text-decoration applied to lost when mixed with or
  • c2cca2a: 8330647: Two CDS tests fail with -UseCompressedOops and UseSerialGC/UseParallelGC
  • 6d2aeb8: 8332745: Method::is_vanilla_constructor is never used
  • ... and 3 more: https://git.openjdk.org/jdk/compare/6a35311468222f9335b43d548df2ecb80746b389...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 25, 2024
@openjdk openjdk bot closed this May 25, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels May 25, 2024
@openjdk
Copy link

openjdk bot commented May 25, 2024

@kimbarrett @LizBing Pushed as commit 985b9ce.

💡 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

Labels

graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

4 participants