Request for review: 7102776 Pack instanceKlass boolean fields into single u1 field
David Holmes
david.holmes at oracle.com
Thu Nov 10 03:02:24 PST 2011
Hi Chris,
On 10/11/2011 7:26 PM, Christian Thalinger wrote:
> What about:
>
> - bool _is_marked_dependent:1; // used for marking during flushing and deoptimization
> - bool _rewritten:1; // methods rewritten.
> - bool _has_nonstatic_fields:1; // for sizing with UseCompressedOops
> - bool _should_verify_class:1; // allow caching of preverification
>
> Wouldn't that be much easier? And we already have code like that in e.g. nmethod.hpp.
I'm not familiar with this particular notation but I assume it is
similar to using bitfields. This had been discussed internally but
unfortunately the SA code needs to access the "is-marked-dependent" bit
and as there's no guarantee as to the order in which bitfields are
packed, the SA would not know how to extract that bit.
David
-----
> -- Chris
>
> On Nov 9, 2011, at 6:47 PM, Jiangli Zhou wrote:
>
>> Compact following 4 instanceKlass boolean fields into a signal u1 field. Each flag now uses 1-bit. The new field is placed after the _idnum_allocated_count field to utilize the unused 2-byte after _idnum_allocated_count. Compacting these fields saves 4-bytes for each loaded classes.
>>
>> bool _is_marked_dependent; // used for marking during flushing and
>> deoptimization
>> bool _rewritten; // methods rewritten.
>> bool _has_nonstatic_fields; // for sizing with UseCompressedOops
>> bool _should_verify_class; // allow caching of preverification
>>
>> http://cr.openjdk.java.net/~bobv/7102776/webrev.00/
>>
>> Tested with runThese on ubuntu. Ran JPRT.
>>
>> Thanks,
>> Jiangli
>
More information about the hotspot-runtime-dev
mailing list