RFR: 8013934: Garbage collection event for CMS has wrong cause for System.gc()

Erik Helin erik.helin at oracle.com
Tue May 14 15:18:52 UTC 2013


based on feedback from Bengt I've updated the change:
- collect_in_background now takes GCCause as a paremter and
   ConcurrentMarkThread decides which cause to send.

I've also updated collect_in_foreground to take GCCause as a parameter 
to keep the collect_in_background and collect_in_foreground signatures 
the same.

Please see new webrev at:


On 05/09/2013 12:35 PM, Erik Helin wrote:
> Hi all,
> this change fixes an issue with the cause field in the
> vm/gc/collector/garbage_collection trace event for CMS.
> When executing a GC via a call to System.gc, then cause was not
> "System.gc" for CMS in the trace event as expected (it was "CMS
> concurrent mark").
> The problem is that the VM operation VM_GenCollectFullConcurrent gets
> the cause as parameter but does not pass it on to the CMSCollector. This
> change adds the parameter "cause" to CMSCollector::request_full_gc and
> the CMSCollector then saves the parameter as CMSCollector::_full_gc_cause.
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8013934/webrev.00/
> Thanks,
> Erik

More information about the hotspot-gc-dev mailing list