jdk9-rt-stackwalk Udiff hotspot/src/share/vm/memory/universe.cpp (original) (raw)
@@ -113,10 +113,11 @@ oop Universe::_the_min_jint_string = NULL; LatestMethodCache* Universe::_finalizer_register_cache = NULL; LatestMethodCache* Universe::_loader_addClass_cache = NULL; LatestMethodCache* Universe::_pd_implies_cache = NULL; LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL; +LatestMethodCache* Universe::_stackWalker_callback_cache = NULL; oop Universe::_out_of_memory_error_java_heap = NULL; oop Universe::_out_of_memory_error_metaspace = NULL; oop Universe::_out_of_memory_error_class_metaspace = NULL; oop Universe::_out_of_memory_error_array_size = NULL; oop Universe::_out_of_memory_error_gc_overhead_limit = NULL;
@@ -238,10 +239,11 @@ f->do_ptr((void**)&_the_empty_klass_array); _finalizer_register_cache->serialize(f); _loader_addClass_cache->serialize(f); _pd_implies_cache->serialize(f); _throw_illegal_access_error_cache->serialize(f);
- _stackWalker_callback_cache->serialize(f); }
void Universe::check_alignment(uintx size, uintx alignment, const char* name) { if (size < alignment || size % alignment != 0) { vm_exit_during_initialization(
@@ -672,10 +674,11 @@ // Metaspace::initialize_shared_spaces() tries to populate them. Universe::_finalizer_register_cache = new LatestMethodCache(); Universe::_loader_addClass_cache = new LatestMethodCache(); Universe::_pd_implies_cache = new LatestMethodCache(); Universe::_throw_illegal_access_error_cache = new LatestMethodCache();
Universe::_stackWalker_callback_cache = new LatestMethodCache();
if (UseSharedSpaces) { // Read the data structures supporting the shared spaces (shared // system dictionary, symbol table, etc.). After that, access to // the file (other than the mapped regions) is no longer needed, and
@@ -1046,10 +1049,21 @@ } Universe::_pd_implies_cache->init( SystemDictionary::ProtectionDomain_klass(), m); }
- // Setup method for stack walking
- InstanceKlass::cast(SystemDictionary::AbstractStackWalker_klass())->link_class(CHECK_false);
- m = InstanceKlass::cast(SystemDictionary::AbstractStackWalker_klass())->
find_method(vmSymbols::doStackWalk_name(),
vmSymbols::doStackWalk_signature());
- // Allow NULL which should only happen with bootstrapping.
- if (m != NULL) {
- Universe::_stackWalker_callback_cache->init(
SystemDictionary::AbstractStackWalker_klass(), m);
- }
- // This needs to be done before the first scavenge/gc, since // it's an input to soft ref clearing policy. { MutexLocker x(Heap_lock); Universe::update_heap_info_at_gc();