Request for review: 7102776 Pack instanceKlass boolean fields into single u1 field

Dean Long dean.long at oracle.com
Mon Nov 14 10:33:20 PST 2011


By the way, is there a test that would have caught that "set" was being called instead of "clear"?

dl

On 11/14/2011 10:20 AM, Jiangli Zhou wrote:
> Hi Bob,
>
> Sorry for the delay. Here is the updated webrev with dependencies.cpp fixed: http://cr.openjdk.java.net/~bobv/7102776/webrev.01/. Thanks for catching that!
>
> Thanks,
> Jiangli
>
>
> On 11/09/2011 02:13 PM, Bob Vandette wrote:
>> Jiangli,
>>
>> src/share/vm/code/dependencies.cpp:1636     instanceKlass::cast(d)->set_is_marked_dependent();
>>
>> Isn't this supposed to be clear_is_marked_dependent()?
>>
>> Bob.
>>
>>
>> On Nov 9, 2011, at 12: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