8006280: Need to reorder metadata structures to reduce size (64-bit)

Reordered Klass, InstanceKlass and Method to save 8 bytes each

Reviewed-by: coleenp, jiangli
This commit is contained in:
Ioi Lam 2013-01-24 10:57:38 -08:00 committed by Ioi Lam
parent 19303cc71d
commit 27c881b2fb
3 changed files with 19 additions and 18 deletions

View file

@ -256,6 +256,16 @@ class InstanceKlass: public Klass {
// JVMTI fields can be moved to their own structure - see 6315920
unsigned char * _cached_class_file_bytes; // JVMTI: cached class file, before retransformable agent modified it in CFLH
jint _cached_class_file_len; // JVMTI: length of above
volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change
// Class states are defined as ClassState (see above).
// Place the _init_state here to utilize the unused 2-byte after
// _idnum_allocated_count.
u1 _init_state; // state of class
u1 _reference_type; // reference type
JvmtiCachedClassFieldMap* _jvmti_cached_class_field_map; // JVMTI: used during heap iteration
// Method array.
@ -281,15 +291,6 @@ class InstanceKlass: public Klass {
// ...
Array<u2>* _fields;
volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change
// Class states are defined as ClassState (see above).
// Place the _init_state here to utilize the unused 2-byte after
// _idnum_allocated_count.
u1 _init_state; // state of class
u1 _reference_type; // reference type
// embedded Java vtable follows here
// embedded Java itables follows here
// embedded static fields follows here