Hi,

IMHO, if a System.gc() is being called then the cause should be System.gc(). If 
we start down the road of differentiating between the various causes of calls 
to System.gc() this will turn in a nightmare!

Indeed as I look at the patch it’s curious that it’s up to the caller to 
determine is calls to System.gc() have been suppressed. I would have expected 
the collect() call to make the decision as to should the call be honored or not.

 void SystemGCDCmd::execute(DCmdSource source, TRAPS) {
   if (!DisableExplicitGC) {
    Universe::heap()->collect(GCCause::_jcmd_gc_run);
   } else {
     output()->print_cr("Explicit GC is disabled, no GC has been performed.");
   }


Kind regards,
Kirk Pepperdine

On Jan 25, 2015, at 2:15 PM, Yasumasa Suenaga <[email protected]> wrote:

> Hi all,
> 
> GCCause which is printed in gc log is "System.gc()" when jcmd GC.run is 
> invoked. 
> I think that GCCause which is caused by jcmd GC.run should be different from 
> System.gc() . 
> 
> I uploaded webrev for this enhancement:
> http://cr.openjdk.java.net/~ysuenaga/JDK-8068589/webrev.00/
> 
> This patch prints "jcmd GC.run" to gc log when jcmd GC.run is invoked. 
> 
> 
> Could you review it?
> 
> 
> Thanks,
> 
> Yasumasa

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to