Request for review:7133260:Remove -Xaprof and the usage of Klass:_alloc_count and ArrayKlass::_alloc_size

Jiangli Zhou jiangli.zhou at
Wed Jun 5 09:44:23 PDT 2013

Hi Stefan,

On 06/05/2013 01:48 AM, Stefan Karlsson wrote:
> On 06/05/2013 04:15 AM, Jiangli Zhou wrote:
>> Hi,
>> Please review following change for 7133260.
> I looked at:

Thanks for doing that! Sorry for the wrong link.

> Looks good. Thanks for doing this cleanup.
> You remove the last usage of:
>  object_iterate_since_last_GC
>  with_array_klasses_do
> so there's even more cleanups that can be done here.

That does appear to be the case. Thanks for noticing that. I'll try to 
remove them as well.

>> In JDK8, -Xaprof support is outdated and broken. A new feature, 
>> GC.class_stats command has been added to jcmd in JDK8. It provides 
>> detailed class metadata memory statistics information. -Xaprof uses 
>> Klass:_alloc_count and ArrayKlass::_alloc_size. Removing -Xaprof and 
>> related fields would save 4bytes per class and 8bytes per array class.
> FTR, I don't think you save 8 bytes for the array classes. The size of 
> ArrayKlass increased so that the vtable offset matches the vtable 
> offset of the InstanceKlasses. See ArrayKlass::static_size.

Thanks for pointing out the ArrayKlass::static_size. You are right, the 
array class size is increased to be the same as InstanceKlass size in 
ArrayKlass::static_size. I will fix CCC. So removing fields from 
ArrayKlass does not yield real saving. :( It also means any size 
reduction in InstanceKlass would help array class. :) Any reason why 
ArrayKlass and InstanceKlass vtable offset need to be matched?

Thanks for the review!


> thanks
> StefanK
>> Please see more information in the CCC request: 
>> Tested with JPTR and vm.quick.testlist.
>> Thanks,
>> Jiangli

More information about the hotspot-runtime-dev mailing list