-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8330694: Rename 'HeapRegion' to 'G1HeapRegion' #18871
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 LizBing! A progress list of the required criteria for merging this PR into |
|
@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: 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
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 |
|
@LizBing The following labels will be automatically applied to this pull request:
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. |
|
/cc hotspot-gc |
|
@LizBing |
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.
Functionally the SA changes look good, but I pointed out a few other places that you might also want to consider doing renames for.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java
Show resolved
Hide resolved
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.
So much scrolling :)
Looks good. Just a few very minor nits for which I don't need to re-review.
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.
Indentation issues. I will run the higher tier SA tests just for verification.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java
Outdated
Show resolved
Hide resolved
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.
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
|
mach5 higher tier SA tests are fine. |
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. |
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.
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. |
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.
Should we also rename 'HeapRegionType' to 'G1HeapRegionType', then rename the current 'G1HeapRegionType' to 'G1 HeapRegionTypeEnum'?
|
|
||
| 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; | ||
| } |
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.
Since these three methods are G1 specific, I'd prefer not to add the 'g1' prefix.
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'm good with leaving the heapRegionIterator() method name as is, but please make sure that @plummercj is good with this too.
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. |
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. |
|
@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"); |
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.
Just a minor nit. I noticed a pre-existing typo on line 87 above. It says "kelp" instead of "kept". Can you fix it?
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.
ok
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.
Still good imo
|
thanks for the review! |
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.
Still looks good.
|
/sponsor |
|
Going to push as commit 985b9ce.
Your commit was automatically rebased without conflicts. |
|
@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. |
follow up 8267941
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18871/head:pull/18871$ git checkout pull/18871Update a local copy of the PR:
$ git checkout pull/18871$ git pull https://git.openjdk.org/jdk.git pull/18871/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18871View PR using the GUI difftool:
$ git pr show -t 18871Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18871.diff
Webrev
Link to Webrev Comment