Add SAP JVM (the proprietary, commercial one) to the recognized hotspot VMs of JMC
Langer, Christoph
christoph.langer at sap.com
Thu Feb 20 16:13:03 UTC 2020
Hi Jie,
Thanks for replying to that. In the meanwhile, I’ve already run the PR and the change is in:
https://github.com/openjdk/jmc/commit/b1c9d6420427b6063db5f8fd00512baa4de8f028
Cheers
Christoph
From: Jie Kang <jkang at redhat.com>
Sent: Donnerstag, 20. Februar 2020 17:09
To: Langer, Christoph <christoph.langer at sap.com>
Cc: jmc-dev at openjdk.java.net
Subject: Re: Add SAP JVM (the proprietary, commercial one) to the recognized hotspot VMs of JMC
On Thu, Feb 13, 2020 at 7:04 AM Langer, Christoph <christoph.langer at sap.com<mailto:christoph.langer at sap.com>> wrote:
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<http://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.
My personal opinion: We're doing it for two names already, if someone is willing to provide the patch for their name, sure why not. Maybe eventually I'd want to verify if there really is no better way to determine the type of JVM or if we even want to have this at all. Another story though.
On the whole, I think you should open a PR and this kind of discussion could still happen and be mirrored appropriately between mailing list and the PR comments.
Cheers,
Thanks & Best regards
Christoph
More information about the jmc-dev
mailing list