hotspot/src/share/vm/memory/universe.cpp
changeset 46746 ea379ebb9447
parent 46729 c62d2e8b2728
child 46772 902c68ab7f57
equal deleted inserted replaced
46745:f7b9bb98bb72 46746:ea379ebb9447
    42 #include "interpreter/interpreter.hpp"
    42 #include "interpreter/interpreter.hpp"
    43 #include "logging/log.hpp"
    43 #include "logging/log.hpp"
    44 #include "logging/logStream.hpp"
    44 #include "logging/logStream.hpp"
    45 #include "memory/filemap.hpp"
    45 #include "memory/filemap.hpp"
    46 #include "memory/metadataFactory.hpp"
    46 #include "memory/metadataFactory.hpp"
       
    47 #include "memory/metaspaceClosure.hpp"
    47 #include "memory/metaspaceShared.hpp"
    48 #include "memory/metaspaceShared.hpp"
    48 #include "memory/oopFactory.hpp"
    49 #include "memory/oopFactory.hpp"
    49 #include "memory/resourceArea.hpp"
    50 #include "memory/resourceArea.hpp"
    50 #include "memory/universe.hpp"
    51 #include "memory/universe.hpp"
    51 #include "memory/universe.inline.hpp"
    52 #include "memory/universe.inline.hpp"
   221   f->do_oop((oop*)&_allocation_context_notification_obj);
   222   f->do_oop((oop*)&_allocation_context_notification_obj);
   222   f->do_oop((oop*)&_reference_pending_list);
   223   f->do_oop((oop*)&_reference_pending_list);
   223   debug_only(f->do_oop((oop*)&_fullgc_alot_dummy_array);)
   224   debug_only(f->do_oop((oop*)&_fullgc_alot_dummy_array);)
   224 }
   225 }
   225 
   226 
       
   227 void LatestMethodCache::metaspace_pointers_do(MetaspaceClosure* it) {
       
   228   it->push(&_klass);
       
   229 }
       
   230 
       
   231 void Universe::metaspace_pointers_do(MetaspaceClosure* it) {
       
   232   it->push(&_boolArrayKlassObj);
       
   233   it->push(&_byteArrayKlassObj);
       
   234   it->push(&_charArrayKlassObj);
       
   235   it->push(&_intArrayKlassObj);
       
   236   it->push(&_shortArrayKlassObj);
       
   237   it->push(&_longArrayKlassObj);
       
   238   it->push(&_singleArrayKlassObj);
       
   239   it->push(&_doubleArrayKlassObj);
       
   240   for (int i = 0; i < T_VOID+1; i++) {
       
   241     it->push(&_typeArrayKlassObjs[i]);
       
   242   }
       
   243   it->push(&_objectArrayKlassObj);
       
   244 
       
   245   it->push(&_the_empty_int_array);
       
   246   it->push(&_the_empty_short_array);
       
   247   it->push(&_the_empty_klass_array);
       
   248   it->push(&_the_empty_method_array);
       
   249   it->push(&_the_array_interfaces_array);
       
   250 
       
   251   _finalizer_register_cache->metaspace_pointers_do(it);
       
   252   _loader_addClass_cache->metaspace_pointers_do(it);
       
   253   _pd_implies_cache->metaspace_pointers_do(it);
       
   254   _throw_illegal_access_error_cache->metaspace_pointers_do(it);
       
   255   _do_stack_walk_cache->metaspace_pointers_do(it);
       
   256 }
       
   257 
   226 // Serialize metadata in and out of CDS archive, not oops.
   258 // Serialize metadata in and out of CDS archive, not oops.
   227 void Universe::serialize(SerializeClosure* f, bool do_all) {
   259 void Universe::serialize(SerializeClosure* f, bool do_all) {
   228 
   260 
   229   f->do_ptr((void**)&_boolArrayKlassObj);
   261   f->do_ptr((void**)&_boolArrayKlassObj);
   230   f->do_ptr((void**)&_byteArrayKlassObj);
   262   f->do_ptr((void**)&_byteArrayKlassObj);