G1 STW phases and FGC column in jstat

Yasumasa Suenaga yasuenag at gmail.com
Tue Mar 1 23:03:34 UTC 2016


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, kirk at 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 <yasuenag at 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
>>
>>
>


More information about the serviceability-dev mailing list