RFR: 8268122: Add specific gc cause for G1 full collections [v4]

Stefan Johansson sjohanss at openjdk.java.net
Wed Jun 9 14:29:30 UTC 2021


> Please review this change to add a new GC cause for GC Full collections that are caused by a prior collection not being able to free up enough space.
> 
> **Summary**
> During the review of PR #3143 it got pretty clear that reusing the Young GC cause for a following Full GC is not always good. A solution for this is to add a new GC cause that is used if a young collection can't free up enough space. This cause will not be used for other explicit Full GCs, like a call to `System.gc()`.
> 
> The would result in a change from:
> 
> [13,276s][info][gc             ] GC(71) Pause Young (Normal) (G1 Evacuation Pause) 3096M->3096M(3100M) 1,159ms
> [13,644s][info][gc             ] GC(72) Pause Full (G1 Evacuation Pause) 3096M->3096M(3100M) 368,157ms
> 
> to:
> 
> [18,454s][info][gc             ] GC(84) Pause Young (Normal) (G1 Evacuation Pause) 3096M->3096M(3100M) 1,312ms
> [18,815s][info][gc             ] GC(85) Pause Full (G1 Compaction Pause) 3096M->3096M(3100M) 360,737ms
> 
> 
> This PR is currently based in PR #4342, where we slightly change how Full GCs are scheduled if a Younc GC can't free up enough space.
> 
> **Testing**
> I've tested this change together with PR #4342 and tier1-3 looks good. Also done manual testing making sure the GC-cause is used correctly.

Stefan Johansson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:

 - Merge branch 'master' into 8268122-gc-cause
 - Move compaction cause in enum to under evacuation cause.
 - Update JFR tests with new cause.
   
   Also removing Allocation Failure cause which should not be used by G1 collections.
 - G1 Compaction Pause
 - 8268163: Change the order of fallback full GCs in G1

-------------

Changes: https://git.openjdk.java.net/jdk/pull/4357/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4357&range=03
  Stats: 8 lines in 5 files changed: 6 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4357.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4357/head:pull/4357

PR: https://git.openjdk.java.net/jdk/pull/4357



More information about the hotspot-gc-dev mailing list