hotspot/src/share/vm/memory/universe.cpp
changeset 34319 9d6dd3c5ca23
parent 33980 cbd63978deb5
parent 34280 72bfaaffee36
child 35061 be6025ebffea
--- a/hotspot/src/share/vm/memory/universe.cpp	Wed Jul 05 21:04:26 2017 +0200
+++ b/hotspot/src/share/vm/memory/universe.cpp	Wed Dec 02 10:19:14 2015 -0800
@@ -115,6 +115,7 @@
 LatestMethodCache* Universe::_loader_addClass_cache    = NULL;
 LatestMethodCache* Universe::_pd_implies_cache         = NULL;
 LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL;
+LatestMethodCache* Universe::_do_stack_walk_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;
@@ -240,6 +241,7 @@
   _loader_addClass_cache->serialize(f);
   _pd_implies_cache->serialize(f);
   _throw_illegal_access_error_cache->serialize(f);
+  _do_stack_walk_cache->serialize(f);
 }
 
 void Universe::check_alignment(uintx size, uintx alignment, const char* name) {
@@ -643,6 +645,7 @@
   Universe::_loader_addClass_cache    = new LatestMethodCache();
   Universe::_pd_implies_cache         = new LatestMethodCache();
   Universe::_throw_illegal_access_error_cache = new LatestMethodCache();
+  Universe::_do_stack_walk_cache = new LatestMethodCache();
 
   if (UseSharedSpaces) {
     // Read the data structures supporting the shared spaces (shared
@@ -1017,6 +1020,17 @@
       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::_do_stack_walk_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.
   {