Request for review: 8005895: Inefficient InstanceKlass field packing wasts memory
Jiangli Zhou
jiangli.zhou at oracle.com
Fri Jan 11 08:57:37 PST 2013
Hi Coleen,
Thanks a lot for the review.
Jiangli
On 01/11/2013 05:30 AM, Coleen Phillimore wrote:
> On 1/10/2013 9:01 PM, Jiangli Zhou wrote:
>> Hi Coleen and Aleksey,
>>
>> Here is the updated weber that also packs _has_default_methods with
>> the misc_flags:
>>
>> http://cr.openjdk.java.net/~jiangli/8005895/webrev.01/
>>
>> I've tested the new change with runthese and vm.quick.testlist. The
>> jprt test is running and looks good so far.
>
> This looks great. Thank you for making this additional change. We
> have at least 3 ways of specifying bitfields/flags in our metadata,
> but I want to talk about that on a separate thread.
>
> Thanks,
> Coleen
>
>>
>> Thanks,
>> Jiangli
>>
>> On 01/10/2013 10:22 AM, Coleen Phillimore wrote:
>>> If I remember correctly, _is_marked_dependent had special atomic
>>> properties that made us unable to add them to the misc flags, but
>>> that's a good question about _has_default_methods. It could be a
>>> misc_flags if there's space in that. There'd be a gap but it would
>>> be consistent and we can add more flags in the future.
>>> A comment about _is_marked_dependent would be good too.
>>> thanks,
>>> Coleen
>>>
>>>
>>> On 01/10/2013 01:11 PM, Aleksey Shipilev wrote:
>>>> Why is _has_default_methods not in the enumerated flags there in
>>>> the first place?
>>>>
>>>> -Aleksey
>>>>
>>>> On 10.01.2013, at 21:57, Jiangli Zhou <jiangli.zhou at oracle.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Please review the following trivial change for repacking the
>>>>> InstanceKlass fields to improve memory efficiency.
>>>>>
>>>>> http://cr.openjdk.java.net/~jiangli/8005895/webrev.00/
>>>>>
>>>>> The 'bool' typed variables, '_is_marked_dependent' and
>>>>> '_has_default_methods' were grouped with u2 typed fields. For
>>>>> both, there were 1-byte padding added on 32bit machine. We can
>>>>> pack those two boolean variables together to avoid the padding,
>>>>> then move one of the u2 field to be together with '_init_state'
>>>>> and '_reference_type'. That saves 4 bytes without any real code
>>>>> change.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jiangli
>>>
>>
>
More information about the hotspot-runtime-dev
mailing list