Review request(7u): JDK-8010738: G1: Output for full GCs with +PrintGCDetails should contain perm gen/meta data size change info

Jon Masamitsu jon.masamitsu at oracle.com
Fri Apr 18 02:06:29 UTC 2014


On 4/17/2014 6:53 PM, Poonam Bajaj wrote:
> Hi Jon,
>
> On 4/17/2014 10:07 PM, Jon Masamitsu wrote:
>> Poonam,
>>
>> In jdk7 I think there is a
>>
>>  GenCollectedHeap::print_perm_heap_change()
>>
>> Your changes have added in G1CollectorPolicy
>> 1168 void G1CollectorPolicy::print_perm_heap_change(size_t perm_prev_used) const {
>>
>>
>> Is there still a  GenCollectedHeap::print_perm_heap_change() in the jdk7
>> you're fixing and could you have used that instead of adding the
>> print_perm_heap_change() to G1CollectorPolicy.
>
> Yes, there is print_perm_heap_change() in GenCollectedHeap class. But 
> according to the following hierarchy of classes, I could not use it in 
> G1CollectedHeap
>
> //
> // CollectedHeap
> //   SharedHeap
> //       GenCollectedHeap
> //       G1CollectedHeap
> //   ParallelScavengeHeap
> //
>
> So I added the similar function in G1CollectorPolicy. I can move it to 
> G1CollectedHeap too. And if we don't want duplication, I can explore 
> the possibility of moving it to SharedHeap and then use it in both the 
> derived classes.

I would recommend against moving things to SharedHeap.  That might 
complicate other backports
and since perm gen is gone in jdk9, I think your solution is fine.

Reviewed.

Jon

>
> Thanks,
> Poonam
>
>>
>>
>> Jon
>>
>>
>>
>> On 4/16/2014 6:03 PM, Poonam Bajaj wrote:
>>> Hi,
>>>
>>> Could I have reviews for the following fix:
>>>
>>> JDK-8010738 <https://bugs.openjdk.java.net/browse/JDK-8010738>: G1: 
>>> Output for full GCs with +PrintGCDetails should contain perm 
>>> gen/meta data size change info
>>> webrev: http://cr.openjdk.java.net/~poonam/8010738/webrev.00/
>>>
>>> With JDK7 G1GC when we use -XX:+PrintGCDetails option, PermGen 
>>> information does not get printed in the Full GC logs as shown below:
>>> [Full GC 16M->16M(20M), 0.7055536 secs]
>>>    [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 
>>> 16.7M(20.0M)->16.7M(20.0M)]
>>>
>>> PermGen info should also get printed with Full GC info similar to 
>>> what other garbage collectors report. These changes are backport of 
>>> the fix in jdk8 where MetaSpace info gets printed in the Full GC logs.
>>>
>>> With the fix the output looks like:
>>> [Full GC 16M->16M(20M), 0.6763478 secs]
>>>    [Eden: 0.0B(1024.0K)->0.0B(1024.0K) Survivors: 0.0B->0.0B Heap: 
>>> 16.7M(20.0M)->16.7M(20.0M)], [Perm: 1725K->1725K(16384K)]
>>>
>>>
>>> Thanks,
>>> Poonam
>>>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20140417/a4117f28/attachment.htm>


More information about the hotspot-gc-dev mailing list