[10] RFR(M) 8182701: Modify JVMCI to allow Graal Compiler to expose platform MBean
Daniel Fuchs
daniel.fuchs at oracle.com
Wed Sep 13 09:28:39 UTC 2017
Hi Jaroslav,
GraalMBeans.java:
77 @Override
78 public Set<String> mbeanInterfaceNames() {
79 return Collections.singleton(name);
80 }
This is not correct. The return set should be a set of
MXBean interface names, as in Class.getName(), not a set
of MXBean ObjectName strings.
The interface in question must be implemented by the
concrete MBean instance and must be a subclass of
PlatformManagedObject.
It is not required for an MBean to implement such
an interface - if it doesn't then it simply won't
be obtainable from ManagementFactory::getPlatformMXBean
or ManagementFactory::getPlatformMXBeans.
So I suspect that in your case, since mbeanInterfaces()
returns an empty set then mbeanInterfaceNames() should
also return an empty set.
IIRC mbeanInterfaceNames() was introduced so that
you could query for a particular MBean implementing
a given interface without necessarily triggering the
loading and initialization of all interfaces implemented
by all MBeans.
best regards,
-- daniel
On 12/09/2017 18:44, Jaroslav Tulach wrote:
> Dear reviewers,
> after several reconsiderations I have webrev #4 ready for your review. Can you
> please take a look at
>
> http://cr.openjdk.java.net/~jtulach/8182701/webrev.04/
>
> and let me know if it is in a reasonable shape? Thanks a lot.
> -jt
>
More information about the serviceability-dev
mailing list