8278020: ~13% variation in Renaissance-Scrabble

Backport-of: 4ba980ba439f94a6b5015e64382a6c308476d63f
This commit is contained in:
Ioi Lam 2022-01-07 05:30:20 +00:00
parent 7c792f27a8
commit 967ef0c482

View File

@ -117,8 +117,8 @@ class Klass : public Metadata {
// Klass identifier used to implement devirtualized oop closure dispatching.
const KlassID _id;
// vtable length
int _vtable_len;
// Processed access flags, for use by Class.getModifiers.
jint _modifier_flags;
// The fields _super_check_offset, _secondary_super_cache, _secondary_supers
// and _primary_supers all help make fast subtype checks. See big discussion
@ -154,7 +154,10 @@ class Klass : public Metadata {
// Provide access the corresponding instance java.lang.ClassLoader.
ClassLoaderData* _class_loader_data;
jint _modifier_flags; // Processed access flags, for use by Class.getModifiers.
int _vtable_len; // vtable length. This field may be read very often when we
// have lots of itable dispatches (e.g., lambdas and streams).
// Keep it away from the beginning of a Klass to avoid cacheline
// contention that may happen when a nearby object is modified.
AccessFlags _access_flags; // Access flags. The class/interface distinction is stored here.
JFR_ONLY(DEFINE_TRACE_ID_FIELD;)