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 {
4141 private static final String PERM_GEN_PREFIX_PERM = "sun.gc.generation.2." ; // NOI18N
4242 private static final String GC_TYPE_COUNTER_NAME = "sun.gc.policy.name" ; // NOI18N
4343 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
4446
4547 private String permGenPrefix = PERM_GEN_PREFIX_PERM ;
4648
@@ -80,8 +82,12 @@ private void initPermGenPrefix(List<MonitoredValue> monitors) {
8082
8183 private long [] computeMaxCapacity () {
8284 String gcType = jvmstat .findByName (GC_TYPE_COUNTER_NAME );
85+ String gcColName = jvmstat .findByName (GC_COLLECTOR_COUNTER_NAME );
8386
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+ //
8591 // G1 Max Capacity GH-127
8692 // G1 sets the max capacity of all spaces to heap_capacity,
8793 // 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