Mercurial > hg > graal-compiler
diff src/share/vm/utilities/globalDefinitions.hpp @ 1571:2d127394260e
6916623: Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb
Summary: Added new product ObjectAlignmentInBytes flag to control object alignment.
Reviewed-by: twisti, ysr, iveresov
author | kvn |
---|---|
date | Thu, 27 May 2010 18:01:56 -0700 |
parents | 2a1472c30599 |
children | e9ff18c4ace7 |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions.hpp Thu May 27 09:54:07 2010 -0700 +++ b/src/share/vm/utilities/globalDefinitions.hpp Thu May 27 18:01:56 2010 -0700 @@ -73,6 +73,9 @@ extern int BytesPerHeapOop; extern int BitsPerHeapOop; +// Oop encoding heap max +extern uint64_t OopEncodingHeapMax; + const int BitsPerJavaInteger = 32; const int BitsPerJavaLong = 64; const int BitsPerSize_t = size_tSize * BitsPerByte; @@ -292,12 +295,12 @@ // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and // reference fields can be naturally aligned. -const int MinObjAlignment = HeapWordsPerLong; -const int MinObjAlignmentInBytes = MinObjAlignment * HeapWordSize; -const int MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1; +extern int MinObjAlignment; +extern int MinObjAlignmentInBytes; +extern int MinObjAlignmentInBytesMask; -const int LogMinObjAlignment = LogHeapWordsPerLong; -const int LogMinObjAlignmentInBytes = LogMinObjAlignment + LogHeapWordSize; +extern int LogMinObjAlignment; +extern int LogMinObjAlignmentInBytes; // Machine dependent stuff @@ -332,18 +335,16 @@ return align_size_up(size, MinObjAlignment); } -// Pad out certain offsets to jlong alignment, in HeapWord units. +inline bool is_object_aligned(intptr_t addr) { + return addr == align_object_size(addr); +} -#define align_object_offset_(offset) align_size_up_(offset, HeapWordsPerLong) +// Pad out certain offsets to jlong alignment, in HeapWord units. inline intptr_t align_object_offset(intptr_t offset) { return align_size_up(offset, HeapWordsPerLong); } -inline bool is_object_aligned(intptr_t offset) { - return offset == align_object_offset(offset); -} - //---------------------------------------------------------------------------------------------------- // Utility macros for compilers