--- a/src/hotspot/share/memory/universe.cpp Thu Feb 08 21:05:35 2018 +0100
+++ b/src/hotspot/share/memory/universe.cpp Mon Mar 12 12:22:21 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -111,6 +111,7 @@
oop Universe::_system_thread_group = NULL;
objArrayOop Universe::_the_empty_class_klass_array = NULL;
Array<Klass*>* Universe::_the_array_interfaces_array = NULL;
+oop Universe::_the_null_sentinel = NULL;
oop Universe::_the_null_string = NULL;
oop Universe::_the_min_jint_string = NULL;
LatestMethodCache* Universe::_finalizer_register_cache = NULL;
@@ -133,7 +134,6 @@
oop Universe::_arithmetic_exception_instance = NULL;
oop Universe::_virtual_machine_error_instance = NULL;
oop Universe::_vm_exception = NULL;
-oop Universe::_allocation_context_notification_obj = NULL;
oop Universe::_reference_pending_list = NULL;
Array<int>* Universe::_the_empty_int_array = NULL;
@@ -195,6 +195,7 @@
assert(_mirrors[0] == NULL && _mirrors[T_BOOLEAN - 1] == NULL, "checking");
f->do_oop((oop*)&_the_empty_class_klass_array);
+ f->do_oop((oop*)&_the_null_sentinel);
f->do_oop((oop*)&_the_null_string);
f->do_oop((oop*)&_the_min_jint_string);
f->do_oop((oop*)&_out_of_memory_error_java_heap);
@@ -211,7 +212,6 @@
f->do_oop((oop*)&_main_thread_group);
f->do_oop((oop*)&_system_thread_group);
f->do_oop((oop*)&_vm_exception);
- f->do_oop((oop*)&_allocation_context_notification_obj);
f->do_oop((oop*)&_reference_pending_list);
debug_only(f->do_oop((oop*)&_fullgc_alot_dummy_array);)
}
@@ -381,6 +381,11 @@
initialize_basic_type_klass(longArrayKlassObj(), CHECK);
} // end of core bootstrapping
+ {
+ Handle tns = java_lang_String::create_from_str("<null_sentinel>", CHECK);
+ _the_null_sentinel = tns();
+ }
+
// Maybe this could be lifted up now that object array can be initialized
// during the bootstrapping.
@@ -535,32 +540,6 @@
#undef assert_pll_locked
#undef assert_pll_ownership
-
-static bool has_run_finalizers_on_exit = false;
-
-void Universe::run_finalizers_on_exit() {
- if (has_run_finalizers_on_exit) return;
- has_run_finalizers_on_exit = true;
-
- // Called on VM exit. This ought to be run in a separate thread.
- log_trace(ref)("Callback to run finalizers on exit");
- {
- PRESERVE_EXCEPTION_MARK;
- Klass* finalizer_klass = SystemDictionary::Finalizer_klass();
- JavaValue result(T_VOID);
- JavaCalls::call_static(
- &result,
- finalizer_klass,
- vmSymbols::run_finalizers_on_exit_name(),
- vmSymbols::void_method_signature(),
- THREAD
- );
- // Ignore any pending exceptions
- CLEAR_PENDING_EXCEPTION;
- }
-}
-
-
// initialize_vtable could cause gc if
// 1) we specified true to initialize_vtable and
// 2) this ran after gc was enabled
@@ -755,14 +734,8 @@
// HeapBased - Use compressed oops with heap base + encoding.
jint Universe::initialize_heap() {
- jint status = JNI_ERR;
-
- _collectedHeap = create_heap_ext();
- if (_collectedHeap == NULL) {
- _collectedHeap = create_heap();
- }
-
- status = _collectedHeap->initialize();
+ _collectedHeap = create_heap();
+ jint status = _collectedHeap->initialize();
if (status != JNI_OK) {
return status;
}