United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6916623 Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb
JDK-6916623 : Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb

Details
Type:
Enhancement
Submit Date:
2010-01-13
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
sparc
Priority:
P5
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs19 (b03)

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:
Relates:

Sub Tasks

Description
Whenever we decide to use Compressed Oops with 64Gb heap AT LEAST next changes should be made to build VM which support it.
Note: more complex changes needed to use a VM option. I don't see benefits on N2 with it so I am putting it on shelf. 

src/share/vm/utilities/globalDefinitions.hpp
@@ -288,11 +288,11
 // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and
 // reference fields can be naturally aligned.
 
-const int MinObjAlignment            = HeapWordsPerLong;
+const int MinObjAlignment            = HeapWordsPerLong * 2; // *2 for 16 bytes alignment
 const int MinObjAlignmentInBytes     = MinObjAlignment * HeapWordSize;
 const int MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1;
 
-const int LogMinObjAlignment         = LogHeapWordsPerLong;
+const int LogMinObjAlignment         = LogHeapWordsPerLong + 1;  // +1 for 16 bytes alignment
 const int LogMinObjAlignmentInBytes  = LogMinObjAlignment + LogHeapWordSize;

                                    

Comments
EVALUATION

Added new product -XX:ObjectAlignmentInBytes=8 flag to control object alignment.
                                     
2010-05-27
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/2d127394260e
                                     
2010-05-28
PUBLIC COMMENTS

Added new product flag (only changeable in 64 bit VM) to control object alignment:

-XX:ObjectAlignmentInBytes=8 (default value 8)
                                     
2010-05-28



Hardware and Software, Engineered to Work Together