mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
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:
parent
680ecf1611
commit
4a831d45f0
273 changed files with 6585 additions and 2993 deletions
|
@ -99,6 +99,7 @@ size_t Universe::_heap_capacity_at_last_gc;
|
|||
size_t Universe::_heap_used_at_last_gc;
|
||||
|
||||
CollectedHeap* Universe::_collectedHeap = NULL;
|
||||
address Universe::_heap_base = NULL;
|
||||
|
||||
|
||||
void Universe::basic_type_classes_do(void f(klassOop)) {
|
||||
|
@ -464,7 +465,7 @@ void Universe::init_self_patching_vtbl_list(void** list, int count) {
|
|||
|
||||
class FixupMirrorClosure: public ObjectClosure {
|
||||
public:
|
||||
void do_object(oop obj) {
|
||||
virtual void do_object(oop obj) {
|
||||
if (obj->is_klass()) {
|
||||
EXCEPTION_MARK;
|
||||
KlassHandle k(THREAD, klassOop(obj));
|
||||
|
@ -667,7 +668,7 @@ jint universe_init() {
|
|||
"LogHeapWordSize is incorrect.");
|
||||
guarantee(sizeof(oop) >= sizeof(HeapWord), "HeapWord larger than oop?");
|
||||
guarantee(sizeof(oop) % sizeof(HeapWord) == 0,
|
||||
"oop size is not not a multiple of HeapWord size");
|
||||
"oop size is not not a multiple of HeapWord size");
|
||||
TraceTime timer("Genesis", TraceStartupTime);
|
||||
GC_locker::lock(); // do not allow gc during bootstrapping
|
||||
JavaClasses::compute_hard_coded_offsets();
|
||||
|
@ -759,6 +760,15 @@ jint Universe::initialize_heap() {
|
|||
if (status != JNI_OK) {
|
||||
return status;
|
||||
}
|
||||
if (UseCompressedOops) {
|
||||
// Subtract a page because something can get allocated at heap base.
|
||||
// This also makes implicit null checking work, because the
|
||||
// memory+1 page below heap_base needs to cause a signal.
|
||||
// See needs_explicit_null_check.
|
||||
// Only set the heap base for compressed oops because it indicates
|
||||
// compressed oops for pstack code.
|
||||
Universe::_heap_base = Universe::heap()->base() - os::vm_page_size();
|
||||
}
|
||||
|
||||
// We will never reach the CATCH below since Exceptions::_throw will cause
|
||||
// the VM to exit if an exception is thrown during initialization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue