Add SAP JVM (the proprietary, commercial one) to the recognized hotspot VMs of JMC
Jie Kang
jkang at redhat.com
Thu Feb 20 16:08:33 UTC 2020
On Thu, Feb 13, 2020 at 7:04 AM Langer, Christoph <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 = 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