<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-2022-jp"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi,<div><br></div><div>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!</div><div><br></div><div>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.</div><div><br></div><div><pre style="word-wrap: break-word; white-space: pre-wrap;"> 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.");
   }</pre><div><br></div></div><div><br></div><div>Kind regards,</div><div>Kirk Pepperdine</div><div><br><div><div>On Jan 25, 2015, at 2:15 PM, Yasumasa Suenaga <<a href="mailto:yasuenag@gmail.com">yasuenag@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all,<br><br>GCCause which is printed in gc log is "System.gc()" when jcmd GC.run is invoked. <br>I think that GCCause which is caused by jcmd GC.run should be different from System.gc() . <br><br>I uploaded webrev for this enhancement:<br><a href="http://cr.openjdk.java.net/~ysuenaga/JDK-8068589/webrev.00/">http://cr.openjdk.java.net/~ysuenaga/JDK-8068589/webrev.00/</a><br><br>This patch prints "jcmd GC.run" to gc log when jcmd GC.run is invoked. <br><br><br>Could you review it?<br><br><br>Thanks,<br><br>Yasumasa<br></blockquote></div><br></div></body></html>