Open keithc-ca opened 5 years ago
Note a similar change will be required for jcmd https://github.com/eclipse/openj9/issues/5164
The change in question is https://github.com/eclipse/openj9/pull/6589.
OpenJ9DiagnosticsMXBeanImpl
calls a number of Dump
's non-native methods too.
@keithc-ca shouldn't openj9.jvm just be a prereq of jdk.managment?
com.ibm.jvm.Dump
is referenced only in Java 8
which has not modules.
The Dump methods are used in Java 9 and up via Method objects.
Could not jdk.management
require openj9.jvm
and call those methods directly, since they are public?
module-info.java.extra
cannot add extra requires
clauses.
jdk.management
requires java.management
, which contains package com.ibm.java.lang.management.internal
. I suggest making openj9.jvm
require java.management
and moving the implementations of the com.ibm.jvm.Dump
methods into com.ibm.java.lang.management.internal. That removes the disparity between Java 8 and modular Java in OpenJ9DiagnosticsMXBeanImpl
.
I took a crack at it and it looks feasible. Here is the work in progress: https://github.com/pdbain-ibm/openj9/tree/mxbean. The native changes are bogus but should be easy to fix.
The implementation should not depend upon
com.ibm.jvm.Dump
but instead have its own native methods which can reuse code used by the native methods ofcom.ibm.jvm.Dump
.