"Disabling Explicit GC" message in gc log with G1 collector

Tony Printezis tony.printezis at oracle.com
Wed Apr 14 19:38:01 UTC 2010


PS This will go in piggy-backed on 6939027: G1: assertion failure during 
the concurrent phase of cleanup

Now, I have to calm down and be less "trigger happy" in removing code in 
the future... :-)

Tony

Tony Printezis wrote:
> And of course the return is important... duh!
>
> Andreas Kohn wrote:
>> On Wed, 2010-04-14 at 15:25 -0400, Tony Printezis wrote:
>>  
>>> PS This is the culprit, right?
>>>     
>>
>> Yes. I wasn't sure whether the return there is important, so locally i
>> only killed the print() to be safe :)
>>
>> Thanks for picking this up!
>>
>> -- 
>> Andreas
>>
>>  
>>> --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
>>> +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
>>> @@ -912,11 +912,6 @@
>>>      Universe::print_heap_before_gc();
>>>    }
>>>  
>>> -  if (full && DisableExplicitGC) {
>>> -    gclog_or_tty->print("\n\n\nDisabling Explicit GC\n\n\n");
>>> -    return;
>>> -  }
>>> -
>>>    assert(SafepointSynchronize::is_at_safepoint(), "should be at 
>>> safepoint");
>>>    assert(Thread::current() == VMThread::vm_thread(), "should be in 
>>> vm thread");
>>>  
>>>
>>>
>>> Tony Printezis wrote:
>>>    
>>>> Andreas,
>>>>
>>>> Thanks for bringing this up. It's most likely debugging code that 
>>>> we accidentally failed to remove. Apologies. I'll  remove it 
>>>> piggy-backed on my next push.
>>>>
>>>> Tony
>>>>
>>>> Andreas Kohn wrote:
>>>>      
>>>>> Hi,
>>>>>
>>>>> while playing with the G1 collector I noticed that our gc logs are 
>>>>> now
>>>>> filled with a "Disabling Explicit GC" message repeating quite often.
>>>>>
>>>>> This seems to be coming from g1CollectedHeap.cpp
>>>>> G1CollectedHeap::do_collection().
>>>>>
>>>>> We have -XX:+DisableExplicitGC and -Xloggc enabled by default, so 
>>>>> in a
>>>>> way this is pretty much expected.
>>>>> I've now removed the print statement there, so that the gc log 
>>>>> becomes a
>>>>> bit more readable. Was there a reason that G1 logs this condition?
>>>>> Regards,
>>>>> -- 
>>>>> Andreas
>>>>>
>>>>>           
>>
>>   



More information about the hotspot-gc-dev mailing list