Mercurial > hg > truffle
diff src/share/vm/utilities/globalDefinitions.hpp @ 113:ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author | coleenp |
---|---|
date | Sun, 13 Apr 2008 17:43:42 -0400 |
parents | d5fc211aea19 |
children | f3de1255b035 |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions.hpp Fri Apr 11 09:56:35 2008 -0400 +++ b/src/share/vm/utilities/globalDefinitions.hpp Sun Apr 13 17:43:42 2008 -0400 @@ -59,23 +59,26 @@ const int WordsPerLong = 2; // Number of stack entries for longs -const int oopSize = sizeof(char*); +const int oopSize = sizeof(char*); // Full-width oop +extern int heapOopSize; // Oop within a java object const int wordSize = sizeof(char*); const int longSize = sizeof(jlong); const int jintSize = sizeof(jint); const int size_tSize = sizeof(size_t); -// Size of a char[] needed to represent a jint as a string in decimal. -const int jintAsStringSize = 12; +const int BytesPerOop = BytesPerWord; // Full-width oop -const int LogBytesPerOop = LogBytesPerWord; -const int LogBitsPerOop = LogBitsPerWord; -const int BytesPerOop = 1 << LogBytesPerOop; -const int BitsPerOop = 1 << LogBitsPerOop; +extern int LogBytesPerHeapOop; // Oop within a java object +extern int LogBitsPerHeapOop; +extern int BytesPerHeapOop; +extern int BitsPerHeapOop; const int BitsPerJavaInteger = 32; const int BitsPerSize_t = size_tSize * BitsPerByte; +// Size of a char[] needed to represent a jint as a string in decimal. +const int jintAsStringSize = 12; + // In fact this should be // log2_intptr(sizeof(class JavaThread)) - log2_intptr(64); // see os::set_memory_serialize_page() @@ -99,14 +102,14 @@ }; // HeapWordSize must be 2^LogHeapWordSize. -const int HeapWordSize = sizeof(HeapWord); +const int HeapWordSize = sizeof(HeapWord); #ifdef _LP64 -const int LogHeapWordSize = 3; +const int LogHeapWordSize = 3; #else -const int LogHeapWordSize = 2; +const int LogHeapWordSize = 2; #endif -const int HeapWordsPerOop = oopSize / HeapWordSize; -const int HeapWordsPerLong = BytesPerLong / HeapWordSize; +const int HeapWordsPerLong = BytesPerLong / HeapWordSize; +const int LogHeapWordsPerLong = LogBytesPerLong - LogHeapWordSize; // The larger HeapWordSize for 64bit requires larger heaps // for the same application running in 64bit. See bug 4967770. @@ -284,6 +287,9 @@ const int MinObjAlignmentInBytes = MinObjAlignment * HeapWordSize; const int MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1; +const int LogMinObjAlignment = LogHeapWordsPerLong; +const int LogMinObjAlignmentInBytes = LogMinObjAlignment + LogHeapWordSize; + // Machine dependent stuff #include "incls/_globalDefinitions_pd.hpp.incl" @@ -371,7 +377,7 @@ jlong long_value; }; -void check_basic_types(); // cannot define here; uses assert +void basic_types_init(); // cannot define here; uses assert // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java @@ -388,7 +394,8 @@ T_ARRAY = 13, T_VOID = 14, T_ADDRESS = 15, - T_CONFLICT = 16, // for stack value type with conflicting contents + T_NARROWOOP= 16, + T_CONFLICT = 17, // for stack value type with conflicting contents T_ILLEGAL = 99 }; @@ -438,6 +445,7 @@ T_LONG_size = 2, T_OBJECT_size = 1, T_ARRAY_size = 1, + T_NARROWOOP_size = 1, T_VOID_size = 0 }; @@ -465,6 +473,7 @@ T_OBJECT_aelem_bytes = 4, T_ARRAY_aelem_bytes = 4, #endif + T_NARROWOOP_aelem_bytes = 4, T_VOID_aelem_bytes = 0 };