< prev index next >

src/hotspot/share/cds/metaspaceShared.cpp

Print this page
@@ -75,10 +75,12 @@
  #include "memory/oopFactory.hpp"
  #include "memory/resourceArea.hpp"
  #include "memory/universe.hpp"
  #include "nmt/memTracker.hpp"
  #include "oops/compressedKlass.hpp"
+ #include "oops/flatArrayKlass.hpp"
+ #include "oops/inlineKlass.hpp"
  #include "oops/instanceMirrorKlass.hpp"
  #include "oops/klass.inline.hpp"
  #include "oops/objArrayOop.hpp"
  #include "oops/oop.inline.hpp"
  #include "oops/oopHandle.hpp"

@@ -122,11 +124,11 @@
  //
  // The rw and ro regions are linearly allocated, in the order of rw->ro.
  // These regions are aligned with MetaspaceShared::core_region_alignment().
  //
  // These 2 regions are populated in the following steps:
- // [0] All classes are loaded in MetaspaceShared::preload_classes(). All metadata are
+ // [0] All classes are loaded in MetaspaceShared::loadable_descriptors(). All metadata are
  //     temporarily allocated outside of the shared regions.
  // [1] We enter a safepoint and allocate a buffer for the rw/ro regions.
  // [2] C++ vtables are copied into the rw region.
  // [3] ArchiveBuilder copies RW metadata into the rw region.
  // [4] ArchiveBuilder copies RO metadata into the ro region.

@@ -458,11 +460,11 @@
    soc->do_tag(sizeof(Method));
    soc->do_tag(sizeof(ConstMethod));
    soc->do_tag(arrayOopDesc::base_offset_in_bytes(T_BYTE));
    soc->do_tag(sizeof(ConstantPool));
    soc->do_tag(sizeof(ConstantPoolCache));
-   soc->do_tag(objArrayOopDesc::base_offset_in_bytes());
+   soc->do_tag(refArrayOopDesc::base_offset_in_bytes());
    soc->do_tag(typeArrayOopDesc::base_offset_in_bytes(T_BYTE));
    soc->do_tag(sizeof(Symbol));
  
    // Need to do this first, as subsequent steps may call virtual functions
    // in archived Metadata objects.

@@ -873,11 +875,11 @@
    const char* filesep = os::file_separator();
    jio_snprintf(default_classlist, buf_size, "%s%slib%sclasslist",
                 Arguments::get_java_home(), filesep, filesep);
  }
  
- void MetaspaceShared::preload_classes(TRAPS) {
+ void MetaspaceShared::loadable_descriptors(TRAPS) {
    char default_classlist[JVM_MAXPATHLEN];
    const char* classlist_path;
  
    get_default_classlist(default_classlist, JVM_MAXPATHLEN);
    if (SharedClassListFile == nullptr) {

@@ -920,11 +922,11 @@
  }
  
  void MetaspaceShared::preload_and_dump_impl(StaticArchiveBuilder& builder, TRAPS) {
    if (CDSConfig::is_dumping_classic_static_archive()) {
      // We are running with -Xshare:dump
-     preload_classes(CHECK);
+     loadable_descriptors(CHECK);
  
      if (SharedArchiveConfigFile) {
        log_info(aot)("Reading extra data from %s ...", SharedArchiveConfigFile);
        read_extra_data(THREAD, SharedArchiveConfigFile);
        log_info(aot)("Reading extra data: done.");

@@ -1225,10 +1227,15 @@
      return false;
    }
  }
  
  void VM_PopulateDumpSharedSpace::dump_java_heap_objects() {
+   if (CDSConfig::is_valhalla_preview()) {
+     log_info(cds)("Archived java heap is not yet supported with Valhalla preview");
+     return;
+   }
+ 
    if (CDSConfig::is_dumping_heap()) {
      HeapShared::write_heap(&_heap_info);
    } else {
      CDSConfig::log_reasons_for_not_dumping_heap();
    }
< prev index next >