Add SAP JVM (the proprietary, commercial one) to the recognized hotspot VMs of JMC

Langer, Christoph christoph.langer at sap.com
Thu Feb 13 12:03:05 UTC 2020


Hi folks,

as you may or may not know, SAP builds and ships a Hotspot JDK that is based on Oracle’s commercially licensed sources. You won’t find it so much in the free wild, but it is distributed with several SAP products and solutions. It goes by the name “SAP JVM”. Currently it is not recognized as a hotspot VM in JMC.

As it identifies itself by the system property “java.vm.name = SAP Java Server VM”, the detection could be fixed by this little patch:

--- a/core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/version/JavaVMVersionToolkit.java
+++ b/core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/version/JavaVMVersionToolkit.java
@@ -113,7 +113,7 @@ public class JavaVMVersionToolkit {
                if (vmName == null) {
                        return false;
                }
-               return vmName.startsWith("Java HotSpot") || vmName.startsWith("OpenJDK"); //$NON-NLS-1$ //$NON-NLS-2$;
+               return vmName.startsWith("Java HotSpot") || vmName.startsWith("OpenJDK") || vmName.startsWith("SAP"); //$NON-NLS-1$ //$NON-NLS-2$;
        }

}

However, I recall there was some discussion when somebody else proposed something in this area – so I’d like to ask on the mailing list, before I open a PR, whether such a patch would be welcome? ��

Please let me know your thoughts.

Thanks & Best regards
Christoph



More information about the jmc-dev mailing list