Skip to content

Commit 8403996

Browse files
committed
extract system properties from SVM heap dump
1 parent 7dd3096 commit 8403996

File tree

1 file changed

+19
-0
lines changed
  • visualvm/libs.profiler/lib.profiler/src/org/graalvm/visualvm/lib/jfluid/heap

1 file changed

+19
-0
lines changed

visualvm/libs.profiler/lib.profiler/src/org/graalvm/visualvm/lib/jfluid/heap/HprofHeap.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,25 @@ public Properties getSystemProperties() {
308308
return HprofProxy.getProperties(props);
309309
}
310310
}
311+
// Substrate VM
312+
systemClass = getJavaClassByName("com.oracle.svm.core.jdk.SystemPropertiesSupport"); // NOI18N
313+
if (systemClass != null) {
314+
Collection propSupportSubClasses = systemClass.getSubClasses();
315+
316+
for (Iterator it = propSupportSubClasses.iterator(); it.hasNext();) {
317+
JavaClass propSupportSubClass = (JavaClass) it.next();
318+
List propSupportInstances = propSupportSubClass.getInstances();
319+
320+
if (!propSupportInstances.isEmpty()) {
321+
Instance propSupportInstance = (Instance) propSupportInstances.get(0);
322+
Object props = propSupportInstance.getValueOfField("properties"); // NOI18N
323+
324+
if (props instanceof Instance) {
325+
return HprofProxy.getProperties((Instance) props);
326+
}
327+
}
328+
}
329+
}
311330
return null;
312331
}
313332

0 commit comments

Comments
 (0)