Instead of using the event type name in "jfr view gc', use GarbageCollection.name. It's more accurate and prevents "Unknown" being shown for ZGC and Shenandoah.
Before:
$ jfr view gc z.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
N/A 61 Unknown 5.2 GB N/A N/A
N/A 63 Unknown 7.2 GB N/A N/A
16:13:43 0 Unknown 868.0 MB 1.6 GB 0.00808 ms
16:13:43 1 Unknown 1.7 GB 3.8 GB 0.00796 ms
16:13:44 2 Unknown 3.8 GB 9.0 GB 0.0136 ms
$ jfr view gc shen.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:16:07 0 Unknown 2.3 GB 4.9 GB 0.139 ms
16:16:08 1 Unknown 4.9 GB 6.3 GB 0.0693 ms
16:16:09 2 Unknown 6.3 GB 1.2 GB 0.0812 ms
16:16:09 3 Unknown 1.8 GB 5.2 GB 0.0824 ms
16:16:09 4 Unknown 5.2 GB 9.0 GB 0.0930 ms
$ jfr view gc g1.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- ------------------------ -------------- ------------- -------------
14:45:23 0 Young Garbage Collection 49.1 MB 14.2 MB 2.52 ms
14:45:24 1 Old Garbage Collection 46.2 MB 24.6 MB 16.1 ms
14:45:24 2 Old Garbage Collection 40.6 MB 24.6 MB 12.0 ms
14:45:25 3 Young Garbage Collection 40.6 MB 41.2 MB 0.946 ms
14:45:25 4 Old Garbage Collection 41.2 MB 49.2 MB 0 s
$ jfr view gc serial.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- ------------------------ -------------- ------------- -------------
16:33:59 0 Young Garbage Collection 154.8 MB 83.2 MB 41.5 ms
16:33:59 1 Young Garbage Collection 236.8 MB 219.4 MB 76.0 ms
...
16:34:03 37 Old Garbage Collection 6.1 GB 5.6 GB 2.92 s
16:34:07 38 Young Garbage Collection 8.0 GB 8.4 GB 1.85 s
16:34:08 39 Old Garbage Collection 8.4 GB 2.6 GB 1.97 s
$ jfr view gc parallel.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- ------------------------ -------------- ------------- -------------
16:28:10 0 Young Garbage Collection 142.8 MB 80.5 MB 12.5 ms
16:28:10 1 Young Garbage Collection 368.5 MB 326.6 MB 42.1 ms
16:28:11 2 Young Garbage Collection 614.6 MB 556.4 MB 69.2 ms
...
16:28:15 11 Old Garbage Collection 7.2 GB 3.2 GB 768 ms
16:28:16 12 Young Garbage Collection 4.2 GB 4.2 GB 97.8 ms
After:
$ jfr view gc z.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:13:43 0 ZGC Major 868.0 MB 1.6 GB 0.00808 ms
16:13:43 1 ZGC Major 1.7 GB 3.8 GB 0.00796 ms
16:13:44 2 ZGC Major 3.8 GB 9.0 GB 0.0136 ms
16:13:45 3 ZGC Minor 6.6 GB 9.0 GB 0.0203 ms
16:13:46 4 ZGC Minor 9.0 GB 9.0 GB 0.00867 ms
$ jfr view gc shen.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:16:07 0 Shenandoah 2.3 GB 4.9 GB 0.139 ms
16:16:08 1 Shenandoah 4.9 GB 6.3 GB 0.0693 ms
16:16:09 2 Shenandoah 6.3 GB 1.2 GB 0.0812 ms
16:16:09 3 Shenandoah 1.8 GB 5.2 GB 0.0824 ms
16:16:09 4 Shenandoah 5.2 GB 9.0 GB 0.0930 ms
$ jfr view gc g1.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
14:45:23 0 G1New 49.1 MB 14.2 MB 2.52 ms
14:45:24 1 G1Full 46.2 MB 24.6 MB 16.1 ms
14:45:24 2 G1Full 40.6 MB 24.6 MB 12.0 ms
14:45:25 3 G1New 40.6 MB 41.2 MB 0.946 ms
14:45:25 4 G1Old 41.2 MB 49.2 MB 0 s
$ jfr view gc serial.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:33:59 0 DefNew 154.8 MB 83.2 MB 41.5 ms
16:33:59 1 DefNew 236.8 MB 219.4 MB 76.0 ms
...
16:34:03 37 SerialOld 6.1 GB 5.6 GB 2.92 s
16:34:07 38 DefNew 8.0 GB 8.4 GB 1.85 s
16:34:08 39 SerialOld 8.4 GB 2.6 GB 1.97 s
$ jfr view gc parallel.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:28:10 0 ParallelScavenge 142.8 MB 80.5 MB 12.5 ms
16:28:10 1 ParallelScavenge 368.5 MB 326.6 MB 42.1 ms
16:28:11 2 ParallelScavenge 614.6 MB 556.4 MB 69.2 ms
...
16:28:15 11 ParallelOld 7.2 GB 3.2 GB 768 ms
16:28:16 12 ParallelScavenge 4.2 GB 4.2 GB 97.8 ms
Before:
$ jfr view gc z.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
N/A 61 Unknown 5.2 GB N/A N/A
N/A 63 Unknown 7.2 GB N/A N/A
16:13:43 0 Unknown 868.0 MB 1.6 GB 0.00808 ms
16:13:43 1 Unknown 1.7 GB 3.8 GB 0.00796 ms
16:13:44 2 Unknown 3.8 GB 9.0 GB 0.0136 ms
$ jfr view gc shen.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:16:07 0 Unknown 2.3 GB 4.9 GB 0.139 ms
16:16:08 1 Unknown 4.9 GB 6.3 GB 0.0693 ms
16:16:09 2 Unknown 6.3 GB 1.2 GB 0.0812 ms
16:16:09 3 Unknown 1.8 GB 5.2 GB 0.0824 ms
16:16:09 4 Unknown 5.2 GB 9.0 GB 0.0930 ms
$ jfr view gc g1.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- ------------------------ -------------- ------------- -------------
14:45:23 0 Young Garbage Collection 49.1 MB 14.2 MB 2.52 ms
14:45:24 1 Old Garbage Collection 46.2 MB 24.6 MB 16.1 ms
14:45:24 2 Old Garbage Collection 40.6 MB 24.6 MB 12.0 ms
14:45:25 3 Young Garbage Collection 40.6 MB 41.2 MB 0.946 ms
14:45:25 4 Old Garbage Collection 41.2 MB 49.2 MB 0 s
$ jfr view gc serial.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- ------------------------ -------------- ------------- -------------
16:33:59 0 Young Garbage Collection 154.8 MB 83.2 MB 41.5 ms
16:33:59 1 Young Garbage Collection 236.8 MB 219.4 MB 76.0 ms
...
16:34:03 37 Old Garbage Collection 6.1 GB 5.6 GB 2.92 s
16:34:07 38 Young Garbage Collection 8.0 GB 8.4 GB 1.85 s
16:34:08 39 Old Garbage Collection 8.4 GB 2.6 GB 1.97 s
$ jfr view gc parallel.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- ------------------------ -------------- ------------- -------------
16:28:10 0 Young Garbage Collection 142.8 MB 80.5 MB 12.5 ms
16:28:10 1 Young Garbage Collection 368.5 MB 326.6 MB 42.1 ms
16:28:11 2 Young Garbage Collection 614.6 MB 556.4 MB 69.2 ms
...
16:28:15 11 Old Garbage Collection 7.2 GB 3.2 GB 768 ms
16:28:16 12 Young Garbage Collection 4.2 GB 4.2 GB 97.8 ms
After:
$ jfr view gc z.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:13:43 0 ZGC Major 868.0 MB 1.6 GB 0.00808 ms
16:13:43 1 ZGC Major 1.7 GB 3.8 GB 0.00796 ms
16:13:44 2 ZGC Major 3.8 GB 9.0 GB 0.0136 ms
16:13:45 3 ZGC Minor 6.6 GB 9.0 GB 0.0203 ms
16:13:46 4 ZGC Minor 9.0 GB 9.0 GB 0.00867 ms
$ jfr view gc shen.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:16:07 0 Shenandoah 2.3 GB 4.9 GB 0.139 ms
16:16:08 1 Shenandoah 4.9 GB 6.3 GB 0.0693 ms
16:16:09 2 Shenandoah 6.3 GB 1.2 GB 0.0812 ms
16:16:09 3 Shenandoah 1.8 GB 5.2 GB 0.0824 ms
16:16:09 4 Shenandoah 5.2 GB 9.0 GB 0.0930 ms
$ jfr view gc g1.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
14:45:23 0 G1New 49.1 MB 14.2 MB 2.52 ms
14:45:24 1 G1Full 46.2 MB 24.6 MB 16.1 ms
14:45:24 2 G1Full 40.6 MB 24.6 MB 12.0 ms
14:45:25 3 G1New 40.6 MB 41.2 MB 0.946 ms
14:45:25 4 G1Old 41.2 MB 49.2 MB 0 s
$ jfr view gc serial.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:33:59 0 DefNew 154.8 MB 83.2 MB 41.5 ms
16:33:59 1 DefNew 236.8 MB 219.4 MB 76.0 ms
...
16:34:03 37 SerialOld 6.1 GB 5.6 GB 2.92 s
16:34:07 38 DefNew 8.0 GB 8.4 GB 1.85 s
16:34:08 39 SerialOld 8.4 GB 2.6 GB 1.97 s
$ jfr view gc parallel.jfr
Garbage Collections
Start GC ID Type Heap Before GC Heap After GC Longest Pause
-------- ----- --------------------- -------------- ------------- -------------
16:28:10 0 ParallelScavenge 142.8 MB 80.5 MB 12.5 ms
16:28:10 1 ParallelScavenge 368.5 MB 326.6 MB 42.1 ms
16:28:11 2 ParallelScavenge 614.6 MB 556.4 MB 69.2 ms
...
16:28:15 11 ParallelOld 7.2 GB 3.2 GB 768 ms
16:28:16 12 ParallelScavenge 4.2 GB 4.2 GB 97.8 ms
- links to
-
Commit(master) openjdk/jdk/77a71c5b
-
Review(master) openjdk/jdk/27099