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

8269914: Factor out heap printing for G1 young and full gc #4705

Closed

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Jul 7, 2021

Hi all,

can I have reviews for this change that factors out before/after heap related printing into a single scoped object to be used for both young and full gc code?

There is some minor change in order of printing of unrelated log output (COMMIT/UNCOMMIT region state changes vs. other heap printing), during full gc but since this is very low level debugging I do not see a problem to do that.

(Sorry for the trouble with open/closing this issue already: have been experimenting with the feature to base PRs on other PRs which kind-of failed a bit; rebased on tip after being able to push all dependencies, so this one should be good)

To keep JFR event sending in the correct order, this change includes JDK-8270018.

Thanks,
Thomas


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issues

  • JDK-8269914: Factor out heap printing for G1 young and full gc
  • JDK-8270018: Add scoped object for g1 young gc JFR notification

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4705/head:pull/4705
$ git checkout pull/4705

Update a local copy of the PR:
$ git checkout pull/4705
$ git pull https://git.openjdk.java.net/jdk pull/4705/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4705

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4705.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 7, 2021

👋 Welcome back tschatzl! 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 Jul 7, 2021
@openjdk
Copy link

openjdk bot commented Jul 7, 2021

@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 Jul 7, 2021
@mlbridge
Copy link

mlbridge bot commented Jul 7, 2021

Webrevs

@tschatzl tschatzl force-pushed the submit/8269914-refactor-heap-printing branch from bb712ba to b5b57c0 Compare July 7, 2021 14:54
@tschatzl
Copy link
Contributor Author

tschatzl commented Jul 7, 2021

Apologies for this recent change: due to the way I split the change containing all changes there had been a problem with JFR events getting sent out of order which some tests checked (in jdk/jfr/event/gc/collection/*). The event to send the age table had been sent after the "gc end" event.
This is fixed by making sure that the JFR tracer/timers are appropriately used in scoped objects as well.

Also the original change contained the output of a merge error.

Apologies. Should be all fixed now though, but I'll rerun tier1-5

@tschatzl
Copy link
Contributor Author

tschatzl commented Jul 7, 2021

/issue add JDK-8270018

@openjdk
Copy link

openjdk bot commented Jul 7, 2021

@tschatzl
Adding additional issue to issue list: 8270018: Add scoped object for g1 young gc JFR notification.

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.

Many comments are very subjective; the current version looks fine as well.

src/hotspot/share/gc/g1/g1CollectedHeap.cpp Outdated Show resolved Hide resolved
src/hotspot/share/gc/g1/g1CollectedHeap.cpp Show resolved Hide resolved
src/hotspot/share/gc/g1/g1CollectedHeap.cpp Show resolved Hide resolved
src/hotspot/share/gc/g1/g1CollectedHeap.cpp Outdated Show resolved Hide resolved
src/hotspot/share/gc/g1/g1FullGCScope.hpp Outdated Show resolved Hide resolved
Copy link
Member

@walulyai walulyai left a comment

Choose a reason for hiding this comment

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

lgtm!

Minor:
can we change

hpm -> heap_printer
jtm -> tracer_mark

as done in G1FullGCScope

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.

Looks good.

@openjdk
Copy link

openjdk bot commented Jul 9, 2021

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

8269914: Factor out heap printing for G1 young and full gc
8270018: Add scoped object for g1 young gc JFR notification

Reviewed-by: ayang, iwalulya, kbarrett

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

  • dfd6b2b: Merge
  • 6401633: 8269722: NPE in HtmlDocletWriter
  • 9acb2a6: 8270109: ProblemList 4 SA tests on macOS-aarch64
  • f46a917: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF
  • 9e75f92: 8269738: AssertionError when combining pattern matching and function closure
  • 168af2e: 8269828: corrections in some instruction patterns for KNL x86 platform
  • fa08cc6: 8268766: Desugaring of pattern matching enum switch should be improved
  • 4f70759: 8270006: Switches with 'case null:' should be exhaustive
  • 8f798b8: 8269746: C2: assert(!in->is_CFG()) failed: CFG Node with no controlling input?
  • 5832882: 8269827: JMH tests for AES/GCM byte[] and bytebuffers
  • ... and 27 more: https://git.openjdk.java.net/jdk/compare/248aa5014b6fc5ef4d3de1feca62aa82ed55b8ba...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 Jul 9, 2021
@tschatzl
Copy link
Contributor Author

tschatzl commented Jul 9, 2021

Thanks @albertnetymk @kimbarrett @walulyai for your reviews.

@tschatzl
Copy link
Contributor Author

tschatzl commented Jul 9, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Jul 9, 2021

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

  • dfd6b2b: Merge
  • 6401633: 8269722: NPE in HtmlDocletWriter
  • 9acb2a6: 8270109: ProblemList 4 SA tests on macOS-aarch64
  • f46a917: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF
  • 9e75f92: 8269738: AssertionError when combining pattern matching and function closure
  • 168af2e: 8269828: corrections in some instruction patterns for KNL x86 platform
  • fa08cc6: 8268766: Desugaring of pattern matching enum switch should be improved
  • 4f70759: 8270006: Switches with 'case null:' should be exhaustive
  • 8f798b8: 8269746: C2: assert(!in->is_CFG()) failed: CFG Node with no controlling input?
  • 5832882: 8269827: JMH tests for AES/GCM byte[] and bytebuffers
  • ... and 27 more: https://git.openjdk.java.net/jdk/compare/248aa5014b6fc5ef4d3de1feca62aa82ed55b8ba...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jul 9, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 9, 2021
@openjdk
Copy link

openjdk bot commented Jul 9, 2021

@tschatzl Pushed as commit c93204c.

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

@tschatzl tschatzl deleted the submit/8269914-refactor-heap-printing branch July 13, 2021 07:38
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
4 participants