RFR (M) Close alignment gaps in InstanceKlass
Chris Plummer
chris.plummer at oracle.com
Tue Apr 21 20:41:53 UTC 2020
Hi Coleen,
The SA changes look good. BTW, I've already made the
TestIntConstant.java change in the Loom project.
InstanceKlass::_misc_is_unsafe_anonymous was already changed to "8" in
loom. You might want to sync up with Ron to make sure you aren't making
conflicting changes in this area. Your code looks like:
249 enum {
250 _misc_rewritten = 1 << 0, //
methods rewritten.
251 _misc_has_nonstatic_fields = 1 << 1, // for
sizing with UseCompressedOops
252 _misc_should_verify_class = 1 << 2, // allow
caching of preverification
253 _misc_is_unsafe_anonymous = 1 << 3, // has
embedded _unsafe_anonymous_host field
254 _misc_is_contended = 1 << 4, // marked
with contended annotation
Loom looks like:
static const unsigned _misc_kind_field_size = 0;
...
// Start after _misc_kind field.
enum {
_misc_rewritten = 1 <<
(_misc_kind_field_size + 0), // methods rewritten.
_misc_has_nonstatic_fields = 1 <<
(_misc_kind_field_size + 1), // for sizing with UseCompressedOops
_misc_should_verify_class = 1 <<
(_misc_kind_field_size + 2), // allow caching of preverification
_misc_is_unsafe_anonymous = 1 <<
(_misc_kind_field_size + 3), // has embedded _unsafe_anonymous_host field
_misc_is_contended = 1 <<
(_misc_kind_field_size + 4), // marked with contended annotation
...
At the very least this is a merge conflict that loom will need to deal
with and it would help to know about in advance (Alan normally does the
merges).
thanks,
Chris
On 4/21/20 1:12 PM, coleen.phillimore at oracle.com wrote:
> Summary: moved fields around and some constant fields into ConstantPool
>
> This is a simple change except that I moved some constant fields from
> InstanceKlass into the constant pool so they can be shared read-only
> in the CDS archive. There are associated repercussions in SA and
> JVMCI, so please look at these changes. Also moved similarly sized
> fields together in the class so there's less likelihood of introducing
> gaps in future InstanceKlass changes.
>
> InstanceKlass is reduced from 544 to 520 bytes in a simple Hello World
> class.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/2020/8238048.01/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8238048
>
> Tested with tier1-6.
>
> Thanks,
> Coleen
>
>
More information about the serviceability-dev
mailing list