-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8272651: G1 heap region info print order changed by JDK-8269914 #5252
Conversation
👋 Welcome back sjohanss! A progress list of the required criteria for merging this PR into |
Webrevs
|
@@ -3055,6 +3052,9 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus | |||
// determining collector state. | |||
G1YoungGCTraceTime tm(gc_cause()); | |||
|
|||
// Create the heap printer before internal pause timing to have | |||
// heap information printed as last part of detailed GC log. | |||
G1HeapPrinterMark hpm(this); |
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.
This will make this code (and printing) disappear from the "Other" time in pause timing.
Some of that printing (and data gathering) might be expensive.
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.
Me and Thomas discussed this and we agreed on this being ok. Even if some part of the printing could take a little time it is not important to record it as "other time".
@@ -3042,10 +3043,6 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus | |||
bool should_start_concurrent_mark_operation = collector_state()->in_concurrent_start_gc(); | |||
bool concurrent_operation_is_full_mark = false; | |||
|
|||
// Verification may use the gang workers, so they must be set up before. |
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 see (setup of) the amount of gang workers as input to the garbage collection algorithm, i.e. not the algorithm determines the number of threads, but is determined beforehand before doing the collection.
E.g. see G1YoungCollector::collect() in tschatzl@7fcfdfa#diff-da5609c228269aa265489241cdb50e89299e79b8691e0e534abf2823d7de2615
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.
We discussed this as well and compared it with how the G1FullCollector
handles this and whit this in mind the current proposal is ok. We might want to do more refactoring around this later on, but right now we can see calculating the number of workers as part of the young collector and not only input.
…hing start and end event.
Pushed a small change to make sure all JFR events are sent in the correct order. |
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.
As discussed with Stefan - lgtm.
@kstefanj 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 97 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. ➡️ To integrate this PR with the above commit message to the |
@@ -55,6 +57,15 @@ class G1FullGCSubjectToDiscoveryClosure: public BoolObjectClosure { | |||
} | |||
}; | |||
|
|||
// Full GC Mark that holds GC id and CPU time trace. Needs to be separate | |||
// from the G1FullCollector and G1FullGCScope to get consistent logging. |
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 think saying just "consistent logging" here is too terse; some elaboration (background info and/or with/without this separation comparison) could make the reasoning more explicit.
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.
// from the G1FullCollector and G1FullGCScope to get consistent logging. | |
// from the G1FullCollector and G1FullGCScope to allow the Full GC logging | |
// to have the same structure as the Young GC logging. |
Would this be enough? I don't want to add to many details as it might easily get stale. But I wanted the comment to let the reader know why this isn't folded in to the other structures.
Thanks @walulyai, @tschatzl and @albertnetymk for reviewing. /integrate |
Going to push as commit f11e099.
Your commit was automatically rebased without conflicts. |
Please review this small change to restore and coordinate the order of the G1 logs.
Summary
Recent changes have slightly re-ordered parts of the G1 logs printed with
-Xlog:gc*
for young and full collections. This change will mostly restore the order but also address some differences we had in the past. The biggest part of this change is making sure the region transitions are printed at the "correct" place. For young collections they are moved to just after the phases and for full collections they are moved to be before the end of the pause log.Example logs:
Testing
Locally run g1 tests and also some additional testing through mach5.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5252/head:pull/5252
$ git checkout pull/5252
Update a local copy of the PR:
$ git checkout pull/5252
$ git pull https://git.openjdk.java.net/jdk pull/5252/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5252
View PR using the GUI difftool:
$ git pr show -t 5252
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5252.diff