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

8331398: G1: G1HeapRegionPrinter reclamation events should print the original region type #19017

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Apr 30, 2024

Hi all,

currently, the various reclamation events always print FREE as the region type in the event string because the methods are always called after freeing.

This is kind of useless information (obviously reclaimed regions are FREE after reclaiming), so this CR suggests to use the original type to understand what region has been reclaimed.

It helped at least me a bit when debugging crashes after some refinement changes.

This is based on PR#19013, so please have a look at it as well.

Testing: local compilation, local testing

Thanks,
Thomas


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-8331398: G1: G1HeapRegionPrinter reclamation events should print the original region type (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19017

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

Using diff file

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

Webrev

Link to Webrev Comment

Thomas Schatzl added 2 commits April 30, 2024 10:35
Use different descriptions for different reclamation reasons
   Currently, the various reclamation events always print FREE as the region type in the event string because the methods are always called after freeing.

This is kind of useless information (obviously reclaimed regions are FREE after reclaiming), so this CR suggests to use the original type to understand what region has been reclaimed.

Testing: local compilation, local testing

Thanks,
  Thomas
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 30, 2024

👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into pr/19013 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 30, 2024

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

8331398: G1: G1HeapRegionPrinter reclamation events should print the original region type

Reviewed-by: ayang, iwalulya, gli

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

  • 303ac9f: 8332671: Logging for pretouching thread stacks shows wrong memory range
  • 90758f6: 8332808: Always set java.io.tmpdir to a suitable value in the build
  • e19a421: 8332720: ubsan: instanceKlass.cpp:3550:76: runtime error: member call on null pointer of type 'struct Array'
  • 2581935: 8332528: Generate code in SwitchBootstraps.generateTypeSwitch that require fewer adaptations
  • b890336: 8328083: degrade virtual thread support for GetObjectMonitorUsage
  • 4e6d851: 8325324: Implement JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)
  • 612ae92: 8332735: [JVMCI] Add extra JVMCI events for exception translation
  • 1ea76d3: 8332675: test/hotspot/jtreg/gc/testlibrary/Helpers.java compileClass javadoc does not match after 8321812
  • 94af3c2: 8329203: Parallel: Investigate Mark-Compact for Full GC to decrease memory usage
  • 1e5a278: 8332676: Remove unused BarrierSetAssembler::incr_allocated_bytes
  • ... and 25 more: https://git.openjdk.org/jdk/compare/5cf8288b8071bdcf0c923dd7ba36f91bc7594ef3...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 changed the title 8331398 8331398: G1: HRPrinter reclamation events should print the original region type Apr 30, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 30, 2024
@openjdk
Copy link

openjdk bot commented Apr 30, 2024

@tschatzl 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 Apr 30, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 30, 2024

Webrevs

@openjdk-notifier openjdk-notifier bot changed the base branch from pr/19013 to master May 2, 2024 08:47
@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 submit/8331398-hrprinter-print-original-region-type
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 openjdk bot added ready Pull request is ready to be integrated and removed ready Pull request is ready to be integrated labels May 2, 2024
@openjdk
Copy link

openjdk bot commented May 3, 2024

@tschatzl 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 submit/8331398-hrprinter-print-original-region-type
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 openjdk bot added the merge-conflict Pull request has merge conflict with target branch label May 3, 2024
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label May 23, 2024
@tschatzl
Copy link
Contributor Author

There were quite a few changes due to the merge, so requesting re-reviews

@tschatzl
Copy link
Contributor Author

Thanks @lgxbslgx @albertnetymk @walulyai for your review
/integrate

@openjdk
Copy link

openjdk bot commented May 23, 2024

@tschatzl This pull request has not yet been marked as ready for integration.

@tschatzl tschatzl changed the title 8331398: G1: HRPrinter reclamation events should print the original region type 8331398: G1: G1HeapRegionPrinter reclamation events should print the original region type May 23, 2024
@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 23, 2024
@tschatzl
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented May 24, 2024

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

  • af056c1: 8332106: VerifyError when using switch pattern in this(...) or super(...)
  • da3001d: 8331975: Enable case-insensitive check in ccache and keytab entry lookup
  • 424eb60: 8331683: Clean up GetCarrierThread
  • 9b1d6d6: 8316328: Test jdk/jfr/event/oldobject/TestSanityDefault.java times out for some heap sizes
  • f8a3e4e: 8328998: Encoding support for Intel APX extended general-purpose registers
  • ddd73b4: 8332082: Shenandoah: Use consistent tests to determine when pre-write barrier is active
  • 0a9d1f8: 8332749: Broken link in MemorySegment.Scope.html
  • c9a7b97: 8332829: [BACKOUT] C2: crash in compiled code because of dependency on removed range check CastIIs
  • 7fd9d6c: 8332340: Add JavacBench as a test case for CDS
  • 417d174: 8331348: Some incremental builds deposit files in the make directory
  • ... and 35 more: https://git.openjdk.org/jdk/compare/5cf8288b8071bdcf0c923dd7ba36f91bc7594ef3...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 24, 2024

@tschatzl Pushed as commit a71b404.

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

@tschatzl tschatzl deleted the submit/8331398-hrprinter-print-original-region-type branch June 11, 2024 09:44
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
Development

Successfully merging this pull request may close these issues.

4 participants