Skip to content
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

8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot #17470

Closed
wants to merge 4 commits into from

Conversation

ysramakrishna
Copy link
Member

@ysramakrishna ysramakrishna commented Jan 17, 2024

/issue JDK-8314329

I'd like to propose the following changes to the AgeTable (motivated by the uses in generational shenandoah):

/summary

  1. add an allocation spec so the AgeTable can be allocated on the C-heap, and tracked
  2. add an is_clear() method that checks whether the age table has only zero entries
  3. relax the assertion that the 0th index of the age table is never used, so specific collectors may make use of the slot

Testing:

  • the code has been active in the generational shenandoah repository for several months
  • tested in the jdk repository with hotspot_gc tests
  • code pipeline stress tests
  • github actions (tier1) testing

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-8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot (Task - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17470

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 17, 2024

👋 Welcome back ysr! 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 openjdk bot added the rfr Pull request is ready for review label Jan 17, 2024
@openjdk openjdk bot changed the title JDK-8314329 AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot 8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot Jan 17, 2024
@openjdk
Copy link

openjdk bot commented Jan 17, 2024

@ysramakrishna This issue is referenced in the PR title - it will now be updated.

@openjdk
Copy link

openjdk bot commented Jan 17, 2024

@ysramakrishna Setting summary to:

1. add an allocation spec so the AgeTable can be allocated on the C-heap, and tracked
2. add an `is_clear()` method that verifies that the age table has no non-zero entries
3. relax the assertion that the 0th index of the age table is never used, so specific collectors may make use of the slot

Testing:
- [x] the code has been active in the generational shenandoah repository for several months
- [x] tested in the jdk repository with hotspot_gc tests
- [ ] code pipeline stress tests
- [ ] github actions testing

@openjdk
Copy link

openjdk bot commented Jan 17, 2024

@ysramakrishna 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 hotspot-gc hotspot-gc-dev@openjdk.org label Jan 17, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 17, 2024

Webrevs

Copy link
Contributor

@earthling-amzn earthling-amzn left a comment

Choose a reason for hiding this comment

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

Consider a minor optimization for is_clear test.

Copy link
Contributor

@kdnilsen kdnilsen left a comment

Choose a reason for hiding this comment

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

LGTM

@ysramakrishna
Copy link
Member Author

Thanks @earthling-amzn & @kdnilsen!

Could I please also have one of the G1 folk look over this and approve as a formal Reviewer, so I can push the change; may be @tschatzl or @stefank or @albertnetymk et al. Thanks!

Copy link
Member

@albertnetymk albertnetymk left a comment

Choose a reason for hiding this comment

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

Thanks for the revision. I guess the new API can be const.

@openjdk
Copy link

openjdk bot commented Jan 22, 2024

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

8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot

AgeTable changes:
1. add CHeap allocation spec
2. add a non-product const is_clear() method to check if the age table has only zero entries
3. relax the assertion that the 0th index of the age table is never used, to allow use of that slot

Reviewed-by: wkemper, kdnilsen, ayang, shade

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

  • c9cacfb: 8323657: Compilation of snippet results in VerifyError at runtime with --release 9 (and above)
  • bde650f: 8322282: Incorrect LoaderConstraintTable::add_entry after JDK-8298468
  • be943a9: 8321984: IGV: Upgrade to Netbeans Platform 20
  • d3b2ac1: 8314186: runtime/8176717/TestInheritFD.java failed with "Log file was leaked"
  • 72f1990: 8323057: Recoverable errors may be reported before unrecoverable errors when annotation processing is skipped
  • c84af49: 8324129: C2: Remove some ttyLocker usages in preparation for JDK-8306767
  • fd37262: 8323748: RISC-V: Add Zfh probe code
  • 76afa02: 8322572: AllocationMergesTests.java fails with "IRViolationException: There were one or multiple IR rule failures."
  • 2003610: 8323108: BufferedImage.setData(Raster) should not cast float and double values to integers
  • a474b37: 8324240: Remove unused GrowableArrayView::EMPTY
  • ... and 33 more: https://git.openjdk.org/jdk/compare/de237fb058c74b87ea65a6020939264a5dfe3796...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 22, 2024
@ysramakrishna
Copy link
Member Author

/summary

AgeTable changes:

  1. add CHeap allocation spec
  2. add a non-product const is_clear() method to check if the age table has only zero entries
  3. relax the assertion that the 0th index of the age table is never used, to allow use of that slot

@openjdk
Copy link

openjdk bot commented Jan 22, 2024

@ysramakrishna Updating existing summary to:

AgeTable changes:
1. add CHeap allocation spec
2. add a non-product const is_clear() method to check if the age table has only zero entries
3. relax the assertion that the 0th index of the age table is never used, to allow use of that slot

@ysramakrishna
Copy link
Member Author

Thanks for your reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Jan 22, 2024

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

  • 0d8543d: 8324065: Daylight saving information for Africa/Casablanca are incorrect
  • c9cacfb: 8323657: Compilation of snippet results in VerifyError at runtime with --release 9 (and above)
  • bde650f: 8322282: Incorrect LoaderConstraintTable::add_entry after JDK-8298468
  • be943a9: 8321984: IGV: Upgrade to Netbeans Platform 20
  • d3b2ac1: 8314186: runtime/8176717/TestInheritFD.java failed with "Log file was leaked"
  • 72f1990: 8323057: Recoverable errors may be reported before unrecoverable errors when annotation processing is skipped
  • c84af49: 8324129: C2: Remove some ttyLocker usages in preparation for JDK-8306767
  • fd37262: 8323748: RISC-V: Add Zfh probe code
  • 76afa02: 8322572: AllocationMergesTests.java fails with "IRViolationException: There were one or multiple IR rule failures."
  • 2003610: 8323108: BufferedImage.setData(Raster) should not cast float and double values to integers
  • ... and 34 more: https://git.openjdk.org/jdk/compare/de237fb058c74b87ea65a6020939264a5dfe3796...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 22, 2024

@ysramakrishna Pushed as commit df370d7.

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

@ysramakrishna ysramakrishna deleted the agetable branch January 22, 2024 23:24
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 integrated Pull request has been integrated
5 participants