8334220: Optimize Klass layout after JDK-8180450
Reviewed-by: coleenp, stuefe, dholmes
This commit is contained in:
parent
f7af4504a8
commit
f9b4ea13e6
@ -159,11 +159,6 @@ class Klass : public Metadata {
|
|||||||
// Provide access the corresponding instance java.lang.ClassLoader.
|
// Provide access the corresponding instance java.lang.ClassLoader.
|
||||||
ClassLoaderData* _class_loader_data;
|
ClassLoaderData* _class_loader_data;
|
||||||
|
|
||||||
// Bitmap and hash code used by hashed secondary supers.
|
|
||||||
uintx _bitmap;
|
|
||||||
uint8_t _hash_slot;
|
|
||||||
|
|
||||||
static uint8_t compute_hash_slot(Symbol* s);
|
|
||||||
|
|
||||||
int _vtable_len; // vtable length. This field may be read very often when we
|
int _vtable_len; // vtable length. This field may be read very often when we
|
||||||
// have lots of itable dispatches (e.g., lambdas and streams).
|
// have lots of itable dispatches (e.g., lambdas and streams).
|
||||||
@ -173,6 +168,10 @@ class Klass : public Metadata {
|
|||||||
|
|
||||||
JFR_ONLY(DEFINE_TRACE_ID_FIELD;)
|
JFR_ONLY(DEFINE_TRACE_ID_FIELD;)
|
||||||
|
|
||||||
|
// Bitmap and hash code used by hashed secondary supers.
|
||||||
|
uintx _bitmap;
|
||||||
|
uint8_t _hash_slot;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// This is an index into FileMapHeader::_shared_path_table[], to
|
// This is an index into FileMapHeader::_shared_path_table[], to
|
||||||
// associate this class with the JAR file where it's loaded from during
|
// associate this class with the JAR file where it's loaded from during
|
||||||
@ -392,6 +391,7 @@ protected:
|
|||||||
void set_next_sibling(Klass* s);
|
void set_next_sibling(Klass* s);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static uint8_t compute_hash_slot(Symbol* s);
|
||||||
static void hash_insert(Klass* klass, GrowableArray<Klass*>* secondaries, uintx& bitmap);
|
static void hash_insert(Klass* klass, GrowableArray<Klass*>* secondaries, uintx& bitmap);
|
||||||
static uintx hash_secondary_supers(Array<Klass*>* secondaries, bool rewrite);
|
static uintx hash_secondary_supers(Array<Klass*>* secondaries, bool rewrite);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user