comparison src/share/vm/utilities/globalDefinitions.hpp @ 1579:e9ff18c4ace7

Merge
author jrose
date Wed, 02 Jun 2010 22:45:42 -0700
parents c18cbe5936b8 2d127394260e
children a93a9eda13f7
comparison
equal deleted inserted replaced
1562:dfe27f03244a 1579:e9ff18c4ace7
71 extern int LogBytesPerHeapOop; // Oop within a java object 71 extern int LogBytesPerHeapOop; // Oop within a java object
72 extern int LogBitsPerHeapOop; 72 extern int LogBitsPerHeapOop;
73 extern int BytesPerHeapOop; 73 extern int BytesPerHeapOop;
74 extern int BitsPerHeapOop; 74 extern int BitsPerHeapOop;
75 75
76 // Oop encoding heap max
77 extern uint64_t OopEncodingHeapMax;
78
76 const int BitsPerJavaInteger = 32; 79 const int BitsPerJavaInteger = 32;
77 const int BitsPerJavaLong = 64; 80 const int BitsPerJavaLong = 64;
78 const int BitsPerSize_t = size_tSize * BitsPerByte; 81 const int BitsPerSize_t = size_tSize * BitsPerByte;
79 82
80 // Size of a char[] needed to represent a jint as a string in decimal. 83 // Size of a char[] needed to represent a jint as a string in decimal.
290 // Object alignment, in units of HeapWords. 293 // Object alignment, in units of HeapWords.
291 // 294 //
292 // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and 295 // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and
293 // reference fields can be naturally aligned. 296 // reference fields can be naturally aligned.
294 297
295 const int MinObjAlignment = HeapWordsPerLong; 298 extern int MinObjAlignment;
296 const int MinObjAlignmentInBytes = MinObjAlignment * HeapWordSize; 299 extern int MinObjAlignmentInBytes;
297 const int MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1; 300 extern int MinObjAlignmentInBytesMask;
298 301
299 const int LogMinObjAlignment = LogHeapWordsPerLong; 302 extern int LogMinObjAlignment;
300 const int LogMinObjAlignmentInBytes = LogMinObjAlignment + LogHeapWordSize; 303 extern int LogMinObjAlignmentInBytes;
301 304
302 // Machine dependent stuff 305 // Machine dependent stuff
303 306
304 #include "incls/_globalDefinitions_pd.hpp.incl" 307 #include "incls/_globalDefinitions_pd.hpp.incl"
305 308
330 333
331 inline intptr_t align_object_size(intptr_t size) { 334 inline intptr_t align_object_size(intptr_t size) {
332 return align_size_up(size, MinObjAlignment); 335 return align_size_up(size, MinObjAlignment);
333 } 336 }
334 337
338 inline bool is_object_aligned(intptr_t addr) {
339 return addr == align_object_size(addr);
340 }
341
335 // Pad out certain offsets to jlong alignment, in HeapWord units. 342 // Pad out certain offsets to jlong alignment, in HeapWord units.
336
337 #define align_object_offset_(offset) align_size_up_(offset, HeapWordsPerLong)
338 343
339 inline intptr_t align_object_offset(intptr_t offset) { 344 inline intptr_t align_object_offset(intptr_t offset) {
340 return align_size_up(offset, HeapWordsPerLong); 345 return align_size_up(offset, HeapWordsPerLong);
341 }
342
343 inline bool is_object_aligned(intptr_t offset) {
344 return offset == align_object_offset(offset);
345 } 346 }
346 347
347 348
348 //---------------------------------------------------------------------------------------------------- 349 //----------------------------------------------------------------------------------------------------
349 // Utility macros for compilers 350 // Utility macros for compilers