changeset 59292:a13281715852 nestmates

Summary: don't allocate an embedded field at the end of the InstanceKlass for hidden classes Reviewed-by: lfoltan, dholmes, coleenp
author hseigel
date Tue, 24 Mar 2020 14:37:12 +0000
parents 0b032112c89e
children 315478f0a527
files src/hotspot/share/oops/instanceKlass.cpp src/hotspot/share/oops/instanceKlass.hpp
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/oops/instanceKlass.cpp	Mon Mar 23 18:26:01 2020 -0400
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Tue Mar 24 14:37:12 2020 +0000
@@ -412,7 +412,7 @@
                                        parser.itable_size(),
                                        nonstatic_oop_map_size(parser.total_oop_map_count()),
                                        parser.is_interface(),
-                                       is_hidden_or_anonymous,
+                                       parser.is_unsafe_anonymous(),
                                        should_store_fingerprint(is_hidden_or_anonymous));
 
   const Symbol* const class_name = parser.class_name();
--- a/src/hotspot/share/oops/instanceKlass.hpp	Mon Mar 23 18:26:01 2020 -0400
+++ b/src/hotspot/share/oops/instanceKlass.hpp	Tue Mar 24 14:37:12 2020 +0000
@@ -1096,20 +1096,20 @@
 
   static int size(int vtable_length, int itable_length,
                   int nonstatic_oop_map_size,
-                  bool is_interface, bool is_hidden_or_anonymous, bool has_stored_fingerprint) {
+                  bool is_interface, bool is_unsafe_anonymous, bool has_stored_fingerprint) {
     return align_metadata_size(header_size() +
            vtable_length +
            itable_length +
            nonstatic_oop_map_size +
            (is_interface ? (int)sizeof(Klass*)/wordSize : 0) +
-           (is_hidden_or_anonymous ? (int)sizeof(Klass*)/wordSize : 0) +
+           (is_unsafe_anonymous ? (int)sizeof(Klass*)/wordSize : 0) +
            (has_stored_fingerprint ? (int)sizeof(uint64_t*)/wordSize : 0));
   }
   int size() const                    { return size(vtable_length(),
                                                itable_length(),
                                                nonstatic_oop_map_size(),
                                                is_interface(),
-                                               (is_hidden() || is_unsafe_anonymous()),
+                                               is_unsafe_anonymous(),
                                                has_stored_fingerprint());
   }