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 {
64
64
private static final String SVM_HEAP_DUMP_SUFFIX = ".hprof" ;
65
65
private static final String SYSTEM_PROPERTY_PREFIX = "java.property." ;
66
66
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\\ ..*" ;
67
68
68
69
Application application ;
69
70
JvmstatModel monitoredVm ;
@@ -234,6 +235,9 @@ public void removeMonitoredDataListener(MonitoredDataListener l) {
234
235
}
235
236
236
237
public String [] getGenName () {
238
+ if (jvmstatModel != null ) {
239
+ return jvmstatModel .getGenName ();
240
+ }
237
241
throw new UnsupportedOperationException ();
238
242
}
239
243
@@ -250,6 +254,11 @@ public boolean isThreadMonitoringSupported() {
250
254
}
251
255
252
256
public boolean isMemoryMonitoringSupported () {
257
+ if (monitoredVm != null ) {
258
+ List vals = monitoredVm .findByPattern (MEMORY_COUNTER_REG_EXPR );
259
+
260
+ return vals != null && !vals .isEmpty ();
261
+ }
253
262
return false ;
254
263
}
255
264
You can’t perform that action at this time.
0 commit comments