Merge
authoriignatyev
Sat, 08 Apr 2017 02:40:47 +0000
changeset 44526 731e3ea86eb2
parent 44525 1bb478bd47b5 (current diff)
parent 44524 b0d3e8ba6f27 (diff)
child 44527 5bcf8b52a549
child 44585 ee03d0fb7aa4
child 44630 54aa492f2b19
Merge
--- a/hotspot/src/share/vm/oops/constMethod.hpp	Fri Apr 07 19:36:35 2017 -0700
+++ b/hotspot/src/share/vm/oops/constMethod.hpp	Sat Apr 08 02:40:47 2017 +0000
@@ -359,7 +359,9 @@
   }
 
   // Sizing
-  static int header_size() { return sizeof(ConstMethod)/wordSize; }
+  static int header_size() {
+    return align_size_up(sizeof(ConstMethod), wordSize) / wordSize;
+  }
 
   // Size needed
   static int size(int code_size, InlineTableSizes* sizes);
--- a/hotspot/src/share/vm/oops/constantPool.hpp	Fri Apr 07 19:36:35 2017 -0700
+++ b/hotspot/src/share/vm/oops/constantPool.hpp	Sat Apr 08 02:40:47 2017 +0000
@@ -705,7 +705,9 @@
   }
 
   // Sizing (in words)
-  static int header_size()             { return sizeof(ConstantPool)/wordSize; }
+  static int header_size()             {
+    return align_size_up(sizeof(ConstantPool), wordSize) / wordSize;
+  }
   static int size(int length)          { return align_metadata_size(header_size() + length); }
   int size() const                     { return size(length()); }
 #if INCLUDE_SERVICES
--- a/hotspot/src/share/vm/oops/cpCache.hpp	Fri Apr 07 19:36:35 2017 -0700
+++ b/hotspot/src/share/vm/oops/cpCache.hpp	Sat Apr 08 02:40:47 2017 +0000
@@ -359,7 +359,9 @@
                                                    return (TosState)((_flags >> tos_state_shift) & tos_state_mask); }
 
   // Code generation support
-  static WordSize size()                         { return in_WordSize(sizeof(ConstantPoolCacheEntry) / wordSize); }
+  static WordSize size()                         {
+    return in_WordSize(align_size_up(sizeof(ConstantPoolCacheEntry), wordSize) / wordSize);
+  }
   static ByteSize size_in_bytes()                { return in_ByteSize(sizeof(ConstantPoolCacheEntry)); }
   static ByteSize indices_offset()               { return byte_offset_of(ConstantPoolCacheEntry, _indices); }
   static ByteSize f1_offset()                    { return byte_offset_of(ConstantPoolCacheEntry, _f1); }
--- a/hotspot/src/share/vm/oops/method.hpp	Fri Apr 07 19:36:35 2017 -0700
+++ b/hotspot/src/share/vm/oops/method.hpp	Sat Apr 08 02:40:47 2017 +0000
@@ -671,7 +671,9 @@
 #endif
 
   // sizing
-  static int header_size()                       { return sizeof(Method)/wordSize; }
+  static int header_size()                       {
+    return align_size_up(sizeof(Method), wordSize) / wordSize;
+  }
   static int size(bool is_native);
   int size() const                               { return method_size(); }
 #if INCLUDE_SERVICES
--- a/hotspot/src/share/vm/oops/methodCounters.hpp	Fri Apr 07 19:36:35 2017 -0700
+++ b/hotspot/src/share/vm/oops/methodCounters.hpp	Sat Apr 08 02:40:47 2017 +0000
@@ -116,7 +116,9 @@
 
   AOT_ONLY(Method* method() const { return _method; })
 
-  static int size() { return sizeof(MethodCounters) / wordSize; }
+  static int size() {
+    return align_size_up(sizeof(MethodCounters), wordSize) / wordSize;
+  }
 
   bool is_klass() const { return false; }