File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
visualvm/graalvm/src/org/graalvm/visualvm/graalvm/svm Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ public class SVMJVMImpl extends Jvm implements JvmstatListener {
6464 private static final String SVM_HEAP_DUMP_SUFFIX = ".hprof" ;
6565 private static final String SYSTEM_PROPERTY_PREFIX = "java.property." ;
6666 private static final String SYSTEM_PROPERTY_REG_EXPR = SYSTEM_PROPERTY_PREFIX .replace ("." , "\\ ." )+".*" ; // NOI18N
67+ private static final String MEMORY_COUNTER_REG_EXPR = "sun\\ .gc\\ .generation\\ ..*" ;
6768
6869 Application application ;
6970 JvmstatModel monitoredVm ;
@@ -234,6 +235,9 @@ public void removeMonitoredDataListener(MonitoredDataListener l) {
234235 }
235236
236237 public String [] getGenName () {
238+ if (jvmstatModel != null ) {
239+ return jvmstatModel .getGenName ();
240+ }
237241 throw new UnsupportedOperationException ();
238242 }
239243
@@ -250,6 +254,11 @@ public boolean isThreadMonitoringSupported() {
250254 }
251255
252256 public boolean isMemoryMonitoringSupported () {
257+ if (monitoredVm != null ) {
258+ List vals = monitoredVm .findByPattern (MEMORY_COUNTER_REG_EXPR );
259+
260+ return vals != null && !vals .isEmpty ();
261+ }
253262 return false ;
254263 }
255264
You can’t perform that action at this time.
0 commit comments