Hi Yasumasa,

Good question. I’ve never considered CMS to be a Full GC. This implies that 
there should be separate performance counters for CMS pause phases as it is 
possible to have FGC. Of course a FGC during CMS maybe user triggered, 
triggered outside a CMS cycle, interrupts a CMS cycle, or interrupts a CMS 
phase. I’m not sure how much of a distinction one needs to make here as that 
could be a quick broader discussion. Certainly the purpose isn’t to recreate 
the GC logs in these performance counters. But at the very least not having a 
distinction between full and a STW-CMS phase is kind of misleading in my 
opinion.

Regards,
Kirk

> On Mar 1, 2016, at 5:03 PM, Yasumasa Suenaga <yasue...@gmail.com> wrote:
> 
> Hi Kirk,
> 
>> It is also incorrect to count initial mark and remark in CMS as a FGC.
> 
> Though, how can we check execution of major collection without GC log?
> Should we add new PerfCounter for CGC (and add CGC column to jstat output)?
> 
> 
> Yasumasa
> 
> 
> On 2016/03/02 6:35, k...@kodewerk.com wrote:
>> Hi,
>> 
>> I think it is incorrect to count remark and cleanup as FGC. They are not 
>> full collections. It is also incorrect to count initial mark and remark in 
>> CMS as a FGC. It is unfortunate that this is counted this way.
>> 
>> Regards,
>> Kirk
>> 
>>> On Mar 1, 2016, at 8:56 AM, Yasumasa Suenaga <yasue...@gmail.com> wrote:
>>> 
>>> Hi all,
>>> 
>>> I wonder that STW phases (Remark and Cleanup) at G1 are not counted in 
>>> jstat FGC column.
>>> For example, Initial Mark and Remark at CMS are counted as FGC.
>>> 
>>> For consistency, I think that G1 STW phases should be counted as FGC.
>>> What do you think about it?
>>> 
>>> If it is accepted, I will file it to JBS and will upload webrev.
>>> 
>>> 
>>> suggested fix:
>>> ----------------------
>>> diff -r 8a103ba9a7b2 src/share/vm/gc/g1/g1MonitoringSupport.cpp
>>> --- a/src/share/vm/gc/g1/g1MonitoringSupport.cpp    Mon Feb 29 22:54:24 
>>> 2016 +0900
>>> +++ b/src/share/vm/gc/g1/g1MonitoringSupport.cpp    Tue Mar 01 23:43:30 
>>> 2016 +0900
>>> @@ -103,7 +103,7 @@
>>>   //   name "collector.1".  In a generational collector this would be the
>>>   // old generation collection.
>>>   _full_collection_counters =
>>> -    new CollectorCounters("G1 stop-the-world full collections", 1);
>>> +    new CollectorCounters("G1 stop-the-world phase", 1);
>>> 
>>>   // timer sampling for all counters supporting sampling only update the
>>>   // used value.  See the take_sample() method.  G1 requires both used and
>>> diff -r 8a103ba9a7b2 src/share/vm/gc/g1/vm_operations_g1.cpp
>>> --- a/src/share/vm/gc/g1/vm_operations_g1.cpp       Mon Feb 29 22:54:24 
>>> 2016 +0900
>>> +++ b/src/share/vm/gc/g1/vm_operations_g1.cpp       Tue Mar 01 23:43:30 
>>> 2016 +0900
>>> @@ -230,6 +230,8 @@
>>>   G1CollectedHeap* g1h = G1CollectedHeap::heap();
>>>   GCTraceTime(Info, gc) t(_printGCMessage, g1h->gc_timer_cm(), 
>>> GCCause::_no_gc, true);
>>>   IsGCActiveMark x;
>>> +  SvcGCMarker sgcm(SvcGCMarker::OTHER);
>>> +  TraceCollectorStats tcs(g1h->g1mm()->full_collection_counters());
>>>   _cl->do_void();
>>> }
>>> 
>>> ----------------------
>>> 
>>> 
>>> Thanks,
>>> 
>>> Yasumasa
>>> 
>>> 
>> 

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

Reply via email to