提交 f3a6b7e7 编写于 作者: I iklam

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

Summary: Reordered Klass, InstanceKlass and Method to save 8 bytes each
Reviewed-by: coleenp, jiangli
Contributed-by: ioi.lam@oracle.com
上级 98a7aa39
......@@ -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
......
......@@ -75,11 +75,11 @@
// [class_loader_data]
// [modifier_flags]
// [access_flags ]
// [verify_count ] - not in product
// [alloc_count ]
// [last_biased_lock_bulk_revocation_time] (64 bits)
// [prototype_header]
// [biased_lock_revocation_count]
// [verify_count ] - not in product
// [alloc_count ]
// [_modified_oops]
// [_accumulated_modified_oops]
// [trace_id]
......@@ -164,18 +164,18 @@ class Klass : public Metadata {
jint _modifier_flags; // Processed access flags, for use by Class.getModifiers.
AccessFlags _access_flags; // Access flags. The class/interface distinction is stored here.
#ifndef PRODUCT
int _verify_count; // to avoid redundant verifies
#endif
juint _alloc_count; // allocation profiling support
// Biased locking implementation and statistics
// (the 64-bit chunk goes first, to avoid some fragmentation)
jlong _last_biased_lock_bulk_revocation_time;
markOop _prototype_header; // Used when biased locking is both enabled and disabled for this type
jint _biased_lock_revocation_count;
#ifndef PRODUCT
int _verify_count; // to avoid redundant verifies
#endif
juint _alloc_count; // allocation profiling support
TRACE_DEFINE_KLASS_TRACE_ID;
// Remembered sets support for the oops in the klasses.
......
......@@ -127,8 +127,8 @@ class Method : public Metadata {
InvocationCounter _backedge_counter; // Incremented before each backedge taken - used to trigger frequencey-based optimizations
#ifdef TIERED
jlong _prev_time; // Previous time the rate was acquired
float _rate; // Events (invocation and backedge counter increments) per millisecond
jlong _prev_time; // Previous time the rate was acquired
#endif
#ifndef PRODUCT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册