File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
visualvm/jvmstat/src/org/graalvm/visualvm/jvmstat Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ class JvmJvmstatModel_8 extends JvmJvmstatModel {
41
41
private static final String PERM_GEN_PREFIX_PERM = "sun.gc.generation.2." ; // NOI18N
42
42
private static final String GC_TYPE_COUNTER_NAME = "sun.gc.policy.name" ; // NOI18N
43
43
private static final String G1_NAME = "GarbageFirst" ; // NOI18N
44
+ private static final String GC_COLLECTOR_COUNTER_NAME = "sun.gc.collector.0.name" ; // NOI18N
45
+ private static final String GENERATIONAL_ZGC_NAME = "ZGC minor collection pauses" ; // NOI18N
44
46
45
47
private String permGenPrefix = PERM_GEN_PREFIX_PERM ;
46
48
@@ -80,8 +82,12 @@ private void initPermGenPrefix(List<MonitoredValue> monitors) {
80
82
81
83
private long [] computeMaxCapacity () {
82
84
String gcType = jvmstat .findByName (GC_TYPE_COUNTER_NAME );
85
+ String gcColName = jvmstat .findByName (GC_COLLECTOR_COUNTER_NAME );
83
86
84
- if (G1_NAME .equals (gcType )) {
87
+ if (G1_NAME .equals (gcType ) || GENERATIONAL_ZGC_NAME .equals (gcColName )) {
88
+ // Generational ZGC Max Capacity GH-518
89
+ // Generational ZGC sets the max capacity of all spaces to heap_capacity
90
+ //
85
91
// G1 Max Capacity GH-127
86
92
// G1 sets the max capacity of all spaces to heap_capacity,
87
93
// given that G1 don't always have a reasonable upper bound on how big
You can’t perform that action at this time.
0 commit comments