hotspot/src/share/vm/memory/universe.cpp
changeset 34253 ba3946143842
parent 33612 b1487e78deee
child 34273 8598d07915d9
equal deleted inserted replaced
34252:59d76c40998a 34253:ba3946143842
   113 oop Universe::_the_min_jint_string                   = NULL;
   113 oop Universe::_the_min_jint_string                   = NULL;
   114 LatestMethodCache* Universe::_finalizer_register_cache = NULL;
   114 LatestMethodCache* Universe::_finalizer_register_cache = NULL;
   115 LatestMethodCache* Universe::_loader_addClass_cache    = NULL;
   115 LatestMethodCache* Universe::_loader_addClass_cache    = NULL;
   116 LatestMethodCache* Universe::_pd_implies_cache         = NULL;
   116 LatestMethodCache* Universe::_pd_implies_cache         = NULL;
   117 LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL;
   117 LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL;
       
   118 LatestMethodCache* Universe::_do_stack_walk_cache     = NULL;
   118 oop Universe::_out_of_memory_error_java_heap          = NULL;
   119 oop Universe::_out_of_memory_error_java_heap          = NULL;
   119 oop Universe::_out_of_memory_error_metaspace          = NULL;
   120 oop Universe::_out_of_memory_error_metaspace          = NULL;
   120 oop Universe::_out_of_memory_error_class_metaspace    = NULL;
   121 oop Universe::_out_of_memory_error_class_metaspace    = NULL;
   121 oop Universe::_out_of_memory_error_array_size         = NULL;
   122 oop Universe::_out_of_memory_error_array_size         = NULL;
   122 oop Universe::_out_of_memory_error_gc_overhead_limit  = NULL;
   123 oop Universe::_out_of_memory_error_gc_overhead_limit  = NULL;
   238   f->do_ptr((void**)&_the_empty_klass_array);
   239   f->do_ptr((void**)&_the_empty_klass_array);
   239   _finalizer_register_cache->serialize(f);
   240   _finalizer_register_cache->serialize(f);
   240   _loader_addClass_cache->serialize(f);
   241   _loader_addClass_cache->serialize(f);
   241   _pd_implies_cache->serialize(f);
   242   _pd_implies_cache->serialize(f);
   242   _throw_illegal_access_error_cache->serialize(f);
   243   _throw_illegal_access_error_cache->serialize(f);
       
   244   _do_stack_walk_cache->serialize(f);
   243 }
   245 }
   244 
   246 
   245 void Universe::check_alignment(uintx size, uintx alignment, const char* name) {
   247 void Universe::check_alignment(uintx size, uintx alignment, const char* name) {
   246   if (size < alignment || size % alignment != 0) {
   248   if (size < alignment || size % alignment != 0) {
   247     vm_exit_during_initialization(
   249     vm_exit_during_initialization(
   672   // Metaspace::initialize_shared_spaces() tries to populate them.
   674   // Metaspace::initialize_shared_spaces() tries to populate them.
   673   Universe::_finalizer_register_cache = new LatestMethodCache();
   675   Universe::_finalizer_register_cache = new LatestMethodCache();
   674   Universe::_loader_addClass_cache    = new LatestMethodCache();
   676   Universe::_loader_addClass_cache    = new LatestMethodCache();
   675   Universe::_pd_implies_cache         = new LatestMethodCache();
   677   Universe::_pd_implies_cache         = new LatestMethodCache();
   676   Universe::_throw_illegal_access_error_cache = new LatestMethodCache();
   678   Universe::_throw_illegal_access_error_cache = new LatestMethodCache();
       
   679   Universe::_do_stack_walk_cache = new LatestMethodCache();
   677 
   680 
   678   if (UseSharedSpaces) {
   681   if (UseSharedSpaces) {
   679     // Read the data structures supporting the shared spaces (shared
   682     // Read the data structures supporting the shared spaces (shared
   680     // system dictionary, symbol table, etc.).  After that, access to
   683     // system dictionary, symbol table, etc.).  After that, access to
   681     // the file (other than the mapped regions) is no longer needed, and
   684     // the file (other than the mapped regions) is no longer needed, and
  1046     }
  1049     }
  1047     Universe::_pd_implies_cache->init(
  1050     Universe::_pd_implies_cache->init(
  1048       SystemDictionary::ProtectionDomain_klass(), m);
  1051       SystemDictionary::ProtectionDomain_klass(), m);
  1049   }
  1052   }
  1050 
  1053 
       
  1054   // Setup method for stack walking
       
  1055   InstanceKlass::cast(SystemDictionary::AbstractStackWalker_klass())->link_class(CHECK_false);
       
  1056   m = InstanceKlass::cast(SystemDictionary::AbstractStackWalker_klass())->
       
  1057             find_method(vmSymbols::doStackWalk_name(),
       
  1058                         vmSymbols::doStackWalk_signature());
       
  1059   // Allow NULL which should only happen with bootstrapping.
       
  1060   if (m != NULL) {
       
  1061     Universe::_do_stack_walk_cache->init(
       
  1062       SystemDictionary::AbstractStackWalker_klass(), m);
       
  1063   }
       
  1064 
  1051   // This needs to be done before the first scavenge/gc, since
  1065   // This needs to be done before the first scavenge/gc, since
  1052   // it's an input to soft ref clearing policy.
  1066   // it's an input to soft ref clearing policy.
  1053   {
  1067   {
  1054     MutexLocker x(Heap_lock);
  1068     MutexLocker x(Heap_lock);
  1055     Universe::update_heap_info_at_gc();
  1069     Universe::update_heap_info_at_gc();