[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    RE: RFR : JDK-8151099 : java.lang.management.ManagementFactory.getPlatformMXBeans() should work
From:       Amit Sapre <amit.sapre () oracle ! com>
Date:       2016-07-14 11:50:55
Message-ID: 4fd1a295-4210-4615-b5d4-bef822242aa4 () default
[Download RAW message or body]

Thanks Alan & Mandy for your review comments.
I will incorporate your comments and send a fresh review.
Amit

-----Original Message-----
From: Mandy Chung 
Sent: Thursday, July 14, 2016 11:32 AM
To: David Holmes
Cc: Amit Sapre; serviceability-dev; Daniel Fuchs
Subject: Re: RFR : JDK-8151099 : \
java.lang.management.ManagementFactory.getPlatformMXBeans() should work even if \
jdk.management is not present.


> On Jul 14, 2016, at 8:55 AM, David Holmes <david.holmes@oracle.com> wrote:
> 
> On 13/07/2016 9:06 PM, Mandy Chung wrote:
> > 
> > > On Jul 13, 2016, at 6:56 PM, Amit Sapre <amit.sapre@oracle.com> wrote:
> > > 
> > > Hello,
> > > Please review the fix
> > > 
> > > Bug ID : https://bugs.openjdk.java.net/browse/JDK-8151099
> > > Webrev : http://cr.openjdk.java.net/~hb/sponsorship/8151099/webrev.00/
> > 
> > Looks okay.
> > 
> > You could rename the method to load_and_initialize_klass_or_null to follow the \
> > existing naming convention.
> 
> +1 on that "softload" is not suitable.
> 
> My concern is that the code that calls \
> Management::com_sun_management_internal_GarbageCollectorExtImpl_klass does not seem \
> to handle getting NULL correctly: 
> ./share/vm/services/memoryManager.cpp
> ./share/vm/services/gcNotifier.cpp

Thanks for pointing this out.

We will need to make sure that when jdk.management is present, it will create \
com.sun.management.internal.GarbageCollectorExtImpl as the GC memory manager objects \
for jmm_GetMemoryManagers.  That implements \
com.sun.management.GarbageCollectorMXBean.

When jdk.management is not present, it should return \
sun.management.GarbageCollectorImpl instead that implements \
java.lang.management.GarbageCollectorMXBean.

gcNotifier implements both com.sun.management.GcInfo as well as \
java.lang.management.MemoryPoolMXBean notification.  More surgery might need to be \
done to make sure the implementation handles properly when jdk.management is present \
and absent.

Mandy


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic