RFR: 8297247: Remark time not added to G1 GarbageCollectorMXBeans [v3]

Yude Lin duke at openjdk.org
Mon Nov 28 03:50:39 UTC 2022


> Hi,
> 
> This change uses a G1MonitorScope (covers jstat and GC beans) to replace TraceCollectorStats (only covers jstat) in VM_G1PauseConcurrent::doit(), so that now Remark and Cleanup phase time are both collected by a GC bean.
> This change adds a third bean "G1 Concurrent GC", after "G1 Young Generation" and "G1 Old generation". This has good continuity, meaning that any current application code who uses "G1 Young Generation" and "G1 Old generation" will see nothing changed, but it will now observe a third bean and can decide what to do with it, e.g., summing all of them up.
> Also now the gc beans and jstat fields have 1-to-1 correspondance:
> "G1 Young Generation" -- YGC/YGCT
> "G1 Old generation" -- FGC/FGCT
> "G1 Concurrent GC" -- CGC/CGCT
> 
> Alternative:
> I've considered using the existing bean "G1 Old generation", but it's currently used for Full GCs, and I find unifying Full GCs with Remark and Cleanup under the same bean is a little awkward. For example, I couldn't find a proper name for the G1MemoryManager, or a proper "gc end message" for the post-gc notification. Also, in this way, if users have previously hooked "G1 Old generation" to some kind of Full GC alarm, then they might suddenly find a lot of false-positives (caused by Remark and Cleanup). So this is undesirable.
> 
> Ran tests:
> test/hotspot/jtreg:tier1,2
> test/jdk:tier1
> test/jdk:jdk_jfr_sanity
> test/jdk:needs_g1gc
> test/jdk:jdk_management
> test/hotspot/jtreg:vmTestbase_vm_gc
> test/hotspot/jtreg:vmTestbase_nsk_monitoring

Yude Lin has updated the pull request incrementally with three additional commits since the last revision:

 - An additional test
 - More test fixes, including a destruction order problem
 - Namings

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11341/files
  - new: https://git.openjdk.org/jdk/pull/11341/files/c510ff31..f3be7e64

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11341&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11341&range=01-02

  Stats: 176 lines in 10 files changed: 133 ins; 8 del; 35 mod
  Patch: https://git.openjdk.org/jdk/pull/11341.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11341/head:pull/11341

PR: https://git.openjdk.org/jdk/pull/11341


More information about the hotspot-gc-dev mailing list