-
Notifications
You must be signed in to change notification settings - Fork 232
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
8300742: jstat's CGCT is 5 percent higher than the pause time in -Xlog:gc. #1676
Conversation
…her than the pause time in -Xlog:gc
👋 Welcome back yukikimmura! A progress list of the required criteria for merging this PR into |
…t higher than the pause time in -Xlog:gc
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.
Hi Kimura,
cms changes seem ok.
I'm not sure though if the test is necessary (and worth the CO2). What are the runtimes you are seeing?
Thanks, Richard.
…use time in -Xlog:gc
Hello Richard, The test is to make sure the difference of elapsed time between the two timers. It might be a flaky test. Thanks, |
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.
Looks good to me.
Thanks, Richard.
@yukikimmura This change now passes all automated pre-integration checks. 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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the 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 (@reinrich) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Hi @yukikimmura , |
Hello Richard, Thanks, |
You're welcome. This would be a general guide: https://wiki.openjdk.org/display/JDKUpdates/How+to+contribute+or+backport+a+fix |
/integrate |
@yukikimmura |
/sponsor |
Going to push as commit ebac392.
Your commit was automatically rebased without conflicts. |
@reinrich @yukikimmura Pushed as commit ebac392. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Could anyone review the fix please?
I explain the fix below.
I tested hotspot/gc with rhel and windows x86_64, and no errors found.
I added a test to confirm the fix. There is no risk.
GC time in the gclog is calculated in the GCTraceTime constructor,
and jstat's CGCT is calculated in the TraceCollectorStats constructor.
In my investigation, the cost of the GCTraceTime constructor is larger than that of TraceCollectorStats.
CGCT includes the executing time of GCTraceTime.
Since CGCT is the accmulated time, as the number of CMSGC increases, the difference with the gclog increases.
Only CMSGC, execution order of GCTraceTime and TraceCollectorStats is different from other GCs.
concurrentMarkSweepGeneration.cpp
TraceCollectorStats
GCTraceTime
g1CollectedHeap.cpp / vm_operations_g1.cpp / psParallelCompact.cpp / genCollectedHeap.cpp
GCTraceTime
TraceCollectorStats
I modified the order of two constructors in concurrentMarkSweepGeneration.cpp.
The following is the result. The difference between two timers bcomes small.
The difference of time a GC should be small, because CGCT is the accmulated time.
The order of two timers should be same for all GCs.
Naturally, the GC time in the gclog will increase slightly which is several micro secs in Xmx512m, 2.5GHz CPU.
Windows 2016 / x64
befor modification
jstat CGT 6011
jstat CGCT 8593.0 ms
gclog invocations 6011
gclog time 8136.4 ms
jstat/loggc=1.056 (the difference is 5.6%)
after modification
jstat CGT 6104
jstat CGCT 7503.0 ms
gclog invocations 6104
gclog time 7603.5 ms
jstat/loggc=0.987 (the difference is 1.3%)
RHEL 7 / x64
befor modification
jstat CGT 4576
jstat CGCT 5010.0ms
gclog invocations 4576
gclog time 4871.4 ms
jstat/loggc=1.028 (the difference is 2.8%)
after modification
jstat CG 4297
jstat CGCT 3408.0ms
gclog invocations 4297
gclog time 3416.95 ms
jstat/loggc=0.997 (the difference is 0.3%)
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev pull/1676/head:pull/1676
$ git checkout pull/1676
Update a local copy of the PR:
$ git checkout pull/1676
$ git pull https://git.openjdk.org/jdk11u-dev pull/1676/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1676
View PR using the GUI difftool:
$ git pr show -t 1676
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/1676.diff