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

Bob Vandette bob.vandette at oracle.com
Wed Nov 9 14:13:49 PST 2011


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