6420645: Create a vm that uses compressed oops for up to 32gb heapsizes

Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv

Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
This commit is contained in:
Coleen Phillimore 2008-04-13 17:43:42 -04:00
parent 680ecf1611
commit 4a831d45f0
273 changed files with 6585 additions and 2993 deletions

View file

@ -59,23 +59,26 @@ const int LongAlignmentMask = (1 << LogBytesPerLong) - 1;
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 @@ private:
};
// 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 MinObjAlignment = HeapWordsPerLong;
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 @@ union jlong_accessor {
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 @@ enum BasicType {
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 @@ enum BasicTypeSize {
T_LONG_size = 2,
T_OBJECT_size = 1,
T_ARRAY_size = 1,
T_NARROWOOP_size = 1,
T_VOID_size = 0
};
@ -465,6 +473,7 @@ enum ArrayElementSize {
T_OBJECT_aelem_bytes = 4,
T_ARRAY_aelem_bytes = 4,
#endif
T_NARROWOOP_aelem_bytes = 4,
T_VOID_aelem_bytes = 0
};