src/hotspot/share/memory/metaspaceShared.cpp
changeset 49592 77fb0be7d19f
parent 49481 8d02d496e785
child 49594 898ef81cbc0e
equal deleted inserted replaced
49591:272dff61a2de 49592:77fb0be7d19f
    33 #include "classfile/symbolTable.hpp"
    33 #include "classfile/symbolTable.hpp"
    34 #include "classfile/stringTable.hpp"
    34 #include "classfile/stringTable.hpp"
    35 #include "classfile/systemDictionary.hpp"
    35 #include "classfile/systemDictionary.hpp"
    36 #include "classfile/systemDictionaryShared.hpp"
    36 #include "classfile/systemDictionaryShared.hpp"
    37 #include "code/codeCache.hpp"
    37 #include "code/codeCache.hpp"
    38 #if INCLUDE_ALL_GCS
       
    39 #include "gc/g1/g1Allocator.inline.hpp"
       
    40 #include "gc/g1/g1CollectedHeap.hpp"
       
    41 #endif
       
    42 #include "gc/shared/gcLocker.hpp"
    38 #include "gc/shared/gcLocker.hpp"
    43 #include "interpreter/bytecodeStream.hpp"
    39 #include "interpreter/bytecodeStream.hpp"
    44 #include "interpreter/bytecodes.hpp"
    40 #include "interpreter/bytecodes.hpp"
    45 #include "logging/log.hpp"
    41 #include "logging/log.hpp"
    46 #include "logging/logMessage.hpp"
    42 #include "logging/logMessage.hpp"
    47 #include "memory/filemap.hpp"
    43 #include "memory/filemap.hpp"
    48 #include "memory/metaspace.hpp"
    44 #include "memory/metaspace.hpp"
    49 #include "memory/metaspaceClosure.hpp"
    45 #include "memory/metaspaceClosure.hpp"
    50 #include "memory/metaspaceShared.hpp"
    46 #include "memory/metaspaceShared.hpp"
    51 #include "memory/resourceArea.hpp"
    47 #include "memory/resourceArea.hpp"
       
    48 #include "oops/compressedOops.inline.hpp"
    52 #include "oops/instanceClassLoaderKlass.hpp"
    49 #include "oops/instanceClassLoaderKlass.hpp"
    53 #include "oops/instanceMirrorKlass.hpp"
    50 #include "oops/instanceMirrorKlass.hpp"
    54 #include "oops/instanceRefKlass.hpp"
    51 #include "oops/instanceRefKlass.hpp"
    55 #include "oops/objArrayKlass.hpp"
    52 #include "oops/objArrayKlass.hpp"
    56 #include "oops/objArrayOop.hpp"
    53 #include "oops/objArrayOop.hpp"
    64 #include "runtime/vmThread.hpp"
    61 #include "runtime/vmThread.hpp"
    65 #include "runtime/vm_operations.hpp"
    62 #include "runtime/vm_operations.hpp"
    66 #include "utilities/align.hpp"
    63 #include "utilities/align.hpp"
    67 #include "utilities/defaultStream.hpp"
    64 #include "utilities/defaultStream.hpp"
    68 #include "utilities/hashtable.inline.hpp"
    65 #include "utilities/hashtable.inline.hpp"
       
    66 #if INCLUDE_ALL_GCS
       
    67 #include "gc/g1/g1Allocator.inline.hpp"
       
    68 #include "gc/g1/g1CollectedHeap.hpp"
       
    69 #endif
    69 
    70 
    70 ReservedSpace MetaspaceShared::_shared_rs;
    71 ReservedSpace MetaspaceShared::_shared_rs;
    71 VirtualSpace MetaspaceShared::_shared_vs;
    72 VirtualSpace MetaspaceShared::_shared_vs;
    72 MetaspaceSharedStats MetaspaceShared::_stats;
    73 MetaspaceSharedStats MetaspaceShared::_stats;
    73 bool MetaspaceShared::_has_error_classes;
    74 bool MetaspaceShared::_has_error_classes;
   842       _dump_region->append_intptr_t(0);
   843       _dump_region->append_intptr_t(0);
   843     } else {
   844     } else {
   844       assert(MetaspaceShared::is_heap_object_archiving_allowed(),
   845       assert(MetaspaceShared::is_heap_object_archiving_allowed(),
   845              "Archiving heap object is not allowed");
   846              "Archiving heap object is not allowed");
   846       _dump_region->append_intptr_t(
   847       _dump_region->append_intptr_t(
   847         (intptr_t)oopDesc::encode_heap_oop_not_null(*o));
   848         (intptr_t)CompressedOops::encode_not_null(*o));
   848     }
   849     }
   849   }
   850   }
   850 
   851 
   851   void do_region(u_char* start, size_t size) {
   852   void do_region(u_char* start, size_t size) {
   852     assert((intptr_t)start % sizeof(intptr_t) == 0, "bad alignment");
   853     assert((intptr_t)start % sizeof(intptr_t) == 0, "bad alignment");
  1934     } else {
  1935     } else {
  1935       assert(MetaspaceShared::is_heap_object_archiving_allowed(),
  1936       assert(MetaspaceShared::is_heap_object_archiving_allowed(),
  1936              "Archived heap object is not allowed");
  1937              "Archived heap object is not allowed");
  1937       assert(MetaspaceShared::open_archive_heap_region_mapped(),
  1938       assert(MetaspaceShared::open_archive_heap_region_mapped(),
  1938              "Open archive heap region is not mapped");
  1939              "Open archive heap region is not mapped");
  1939       RootAccess<IN_ARCHIVE_ROOT>::oop_store(p, oopDesc::decode_heap_oop_not_null(o));
  1940       RootAccess<IN_ARCHIVE_ROOT>::oop_store(p, CompressedOops::decode_not_null(o));
  1940     }
  1941     }
  1941   }
  1942   }
  1942 
  1943 
  1943   void do_region(u_char* start, size_t size) {
  1944   void do_region(u_char* start, size_t size) {
  1944     assert((intptr_t)start % sizeof(intptr_t) == 0, "bad alignment");
  1945     assert((intptr_t)start % sizeof(intptr_t) == 0, "bad alignment");