Request for review: 8005895: Inefficient InstanceKlass field packing wasts memory
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Jan 10 10:11:00 PST 2013
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