8205699: assert(_owner_offset != 0) failed in javaClasses.cpp
authorjiangli
Wed, 27 Jun 2018 11:55:35 -0400
changeset 50819 cf09f0b56efd
parent 50818 e46b9e514479
child 50820 35f52a3cd6bd
8205699: assert(_owner_offset != 0) failed in javaClasses.cpp Summary: Added java_util_concurrent_locks_AbstractOwnableSynchronizer::serialize. Reviewed-by: ccheung, dholmes
src/hotspot/share/classfile/javaClasses.cpp
src/hotspot/share/classfile/javaClasses.hpp
src/hotspot/share/memory/metaspaceShared.cpp
--- a/src/hotspot/share/classfile/javaClasses.cpp	Wed Jun 27 20:04:31 2018 +0530
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Wed Jun 27 11:55:35 2018 -0400
@@ -4425,6 +4425,12 @@
   return obj->obj_field(_owner_offset);
 }
 
+#if INCLUDE_CDS
+void java_util_concurrent_locks_AbstractOwnableSynchronizer::serialize(SerializeClosure* f) {
+  AOS_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
+}
+#endif
+
 static int member_offset(int hardcoded_offset) {
   return (hardcoded_offset * heapOopSize) + instanceOopDesc::base_offset_in_bytes();
 }
--- a/src/hotspot/share/classfile/javaClasses.hpp	Wed Jun 27 20:04:31 2018 +0530
+++ b/src/hotspot/share/classfile/javaClasses.hpp	Wed Jun 27 11:55:35 2018 -0400
@@ -1488,6 +1488,7 @@
  public:
   static void compute_offsets();
   static oop  get_owner_threadObj(oop obj);
+  static void serialize(SerializeClosure* f) NOT_CDS_RETURN;
 };
 
 // Use to declare fields that need to be injected into Java classes
--- a/src/hotspot/share/memory/metaspaceShared.cpp	Wed Jun 27 20:04:31 2018 +0530
+++ b/src/hotspot/share/memory/metaspaceShared.cpp	Wed Jun 27 11:55:35 2018 -0400
@@ -455,6 +455,7 @@
   java_lang_StackTraceElement::serialize(soc);
   java_lang_StackFrameInfo::serialize(soc);
   java_lang_LiveStackFrameInfo::serialize(soc);
+  java_util_concurrent_locks_AbstractOwnableSynchronizer::serialize(soc);
 }
 
 address MetaspaceShared::cds_i2i_entry_code_buffers(size_t total_size) {