src/hotspot/share/memory/universe.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File webrev Sdiff src/hotspot/share/memory

src/hotspot/share/memory/universe.cpp

Print this page




  45 #include "logging/logStream.hpp"
  46 #include "memory/filemap.hpp"
  47 #include "memory/metadataFactory.hpp"
  48 #include "memory/metaspaceClosure.hpp"
  49 #include "memory/metaspaceShared.hpp"
  50 #include "memory/oopFactory.hpp"
  51 #include "memory/resourceArea.hpp"
  52 #include "memory/universe.hpp"
  53 #include "memory/universe.hpp"
  54 #include "oops/constantPool.hpp"
  55 #include "oops/instanceClassLoaderKlass.hpp"
  56 #include "oops/instanceKlass.hpp"
  57 #include "oops/instanceMirrorKlass.hpp"
  58 #include "oops/instanceRefKlass.hpp"
  59 #include "oops/objArrayOop.inline.hpp"
  60 #include "oops/oop.inline.hpp"
  61 #include "oops/typeArrayKlass.hpp"
  62 #include "prims/resolvedMethodTable.hpp"
  63 #include "runtime/arguments.hpp"
  64 #include "runtime/atomic.hpp"
  65 #include "runtime/commandLineFlagConstraintList.hpp"

  66 #include "runtime/deoptimization.hpp"
  67 #include "runtime/handles.inline.hpp"
  68 #include "runtime/init.hpp"
  69 #include "runtime/java.hpp"
  70 #include "runtime/javaCalls.hpp"
  71 #include "runtime/sharedRuntime.hpp"
  72 #include "runtime/synchronizer.hpp"
  73 #include "runtime/thread.inline.hpp"
  74 #include "runtime/timerTrace.hpp"
  75 #include "runtime/vm_operations.hpp"
  76 #include "services/memoryService.hpp"
  77 #include "utilities/align.hpp"
  78 #include "utilities/copy.hpp"
  79 #include "utilities/debug.hpp"
  80 #include "utilities/events.hpp"
  81 #include "utilities/formatBuffer.hpp"
  82 #include "utilities/hashtable.inline.hpp"
  83 #include "utilities/macros.hpp"
  84 #include "utilities/ostream.hpp"
  85 #include "utilities/preserveException.hpp"


 681             "oop size is not not a multiple of HeapWord size");
 682 
 683   TraceTime timer("Genesis", TRACETIME_LOG(Info, startuptime));
 684 
 685   JavaClasses::compute_hard_coded_offsets();
 686 
 687   jint status = Universe::initialize_heap();
 688   if (status != JNI_OK) {
 689     return status;
 690   }
 691 
 692   Metaspace::global_initialize();
 693 
 694   // Initialize performance counters for metaspaces
 695   MetaspaceCounters::initialize_performance_counters();
 696   CompressedClassSpaceCounters::initialize_performance_counters();
 697 
 698   AOTLoader::universe_init();
 699 
 700   // Checks 'AfterMemoryInit' constraints.
 701   if (!CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::AfterMemoryInit)) {
 702     return JNI_EINVAL;
 703   }
 704 
 705   // Create memory for metadata.  Must be after initializing heap for
 706   // DumpSharedSpaces.
 707   ClassLoaderData::init_null_class_loader_data();
 708 
 709   // We have a heap so create the Method* caches before
 710   // Metaspace::initialize_shared_spaces() tries to populate them.
 711   Universe::_finalizer_register_cache = new LatestMethodCache();
 712   Universe::_loader_addClass_cache    = new LatestMethodCache();
 713   Universe::_pd_implies_cache         = new LatestMethodCache();
 714   Universe::_throw_illegal_access_error_cache = new LatestMethodCache();
 715   Universe::_do_stack_walk_cache = new LatestMethodCache();
 716 
 717 #if INCLUDE_CDS
 718   if (UseSharedSpaces) {
 719     // Read the data structures supporting the shared spaces (shared
 720     // system dictionary, symbol table, etc.).  After that, access to
 721     // the file (other than the mapped regions) is no longer needed, and




  45 #include "logging/logStream.hpp"
  46 #include "memory/filemap.hpp"
  47 #include "memory/metadataFactory.hpp"
  48 #include "memory/metaspaceClosure.hpp"
  49 #include "memory/metaspaceShared.hpp"
  50 #include "memory/oopFactory.hpp"
  51 #include "memory/resourceArea.hpp"
  52 #include "memory/universe.hpp"
  53 #include "memory/universe.hpp"
  54 #include "oops/constantPool.hpp"
  55 #include "oops/instanceClassLoaderKlass.hpp"
  56 #include "oops/instanceKlass.hpp"
  57 #include "oops/instanceMirrorKlass.hpp"
  58 #include "oops/instanceRefKlass.hpp"
  59 #include "oops/objArrayOop.inline.hpp"
  60 #include "oops/oop.inline.hpp"
  61 #include "oops/typeArrayKlass.hpp"
  62 #include "prims/resolvedMethodTable.hpp"
  63 #include "runtime/arguments.hpp"
  64 #include "runtime/atomic.hpp"
  65 #include "runtime/flags/flagSetting.hpp"
  66 #include "runtime/flags/jvmFlagConstraintList.hpp"
  67 #include "runtime/deoptimization.hpp"
  68 #include "runtime/handles.inline.hpp"
  69 #include "runtime/init.hpp"
  70 #include "runtime/java.hpp"
  71 #include "runtime/javaCalls.hpp"
  72 #include "runtime/sharedRuntime.hpp"
  73 #include "runtime/synchronizer.hpp"
  74 #include "runtime/thread.inline.hpp"
  75 #include "runtime/timerTrace.hpp"
  76 #include "runtime/vm_operations.hpp"
  77 #include "services/memoryService.hpp"
  78 #include "utilities/align.hpp"
  79 #include "utilities/copy.hpp"
  80 #include "utilities/debug.hpp"
  81 #include "utilities/events.hpp"
  82 #include "utilities/formatBuffer.hpp"
  83 #include "utilities/hashtable.inline.hpp"
  84 #include "utilities/macros.hpp"
  85 #include "utilities/ostream.hpp"
  86 #include "utilities/preserveException.hpp"


 682             "oop size is not not a multiple of HeapWord size");
 683 
 684   TraceTime timer("Genesis", TRACETIME_LOG(Info, startuptime));
 685 
 686   JavaClasses::compute_hard_coded_offsets();
 687 
 688   jint status = Universe::initialize_heap();
 689   if (status != JNI_OK) {
 690     return status;
 691   }
 692 
 693   Metaspace::global_initialize();
 694 
 695   // Initialize performance counters for metaspaces
 696   MetaspaceCounters::initialize_performance_counters();
 697   CompressedClassSpaceCounters::initialize_performance_counters();
 698 
 699   AOTLoader::universe_init();
 700 
 701   // Checks 'AfterMemoryInit' constraints.
 702   if (!JVMFlagConstraintList::check_constraints(JVMFlagConstraint::AfterMemoryInit)) {
 703     return JNI_EINVAL;
 704   }
 705 
 706   // Create memory for metadata.  Must be after initializing heap for
 707   // DumpSharedSpaces.
 708   ClassLoaderData::init_null_class_loader_data();
 709 
 710   // We have a heap so create the Method* caches before
 711   // Metaspace::initialize_shared_spaces() tries to populate them.
 712   Universe::_finalizer_register_cache = new LatestMethodCache();
 713   Universe::_loader_addClass_cache    = new LatestMethodCache();
 714   Universe::_pd_implies_cache         = new LatestMethodCache();
 715   Universe::_throw_illegal_access_error_cache = new LatestMethodCache();
 716   Universe::_do_stack_walk_cache = new LatestMethodCache();
 717 
 718 #if INCLUDE_CDS
 719   if (UseSharedSpaces) {
 720     // Read the data structures supporting the shared spaces (shared
 721     // system dictionary, symbol table, etc.).  After that, access to
 722     // the file (other than the mapped regions) is no longer needed, and


src/hotspot/share/memory/universe.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File