< prev index next >

src/hotspot/share/cds/archiveUtils.hpp

Print this page
@@ -34,18 +34,22 @@
  
  class BootstrapInfo;
  class ReservedSpace;
  class VirtualSpace;
  
+ template<class E> class Array;
+ template<class E> class GrowableArray;
+ 
  // ArchivePtrMarker is used to mark the location of pointers embedded in a CDS archive. E.g., when an
  // InstanceKlass k is dumped, we mark the location of the k->_name pointer by effectively calling
  // mark_pointer(/*ptr_loc=*/&k->_name). It's required that (_prt_base <= ptr_loc < _ptr_end). _ptr_base is
  // fixed, but _ptr_end can be expanded as more objects are dumped.
  class ArchivePtrMarker : AllStatic {
    static CHeapBitMap*  _ptrmap;
    static CHeapBitMap*  _rw_ptrmap;
    static CHeapBitMap*  _ro_ptrmap;
+   static CHeapBitMap*  _cc_ptrmap;
    static VirtualSpace* _vs;
  
    // Once _ptrmap is compacted, we don't allow bit marking anymore. This is to
    // avoid unintentional copy operations after the bitmap has been finalized and written.
    static bool         _compacted;

@@ -53,11 +57,11 @@
    static address* ptr_base() { return (address*)_vs->low();  } // committed lower bound (inclusive)
    static address* ptr_end()  { return (address*)_vs->high(); } // committed upper bound (exclusive)
  
  public:
    static void initialize(CHeapBitMap* ptrmap, VirtualSpace* vs);
-   static void initialize_rw_ro_maps(CHeapBitMap* rw_ptrmap, CHeapBitMap* ro_ptrmap);
+   static void initialize_rw_ro_cc_maps(CHeapBitMap* rw_ptrmap, CHeapBitMap* ro_ptrmap, CHeapBitMap* cc_ptrmap);
    static void mark_pointer(address* ptr_loc);
    static void clear_pointer(address* ptr_loc);
    static void compact(address relocatable_base, address relocatable_end);
    static void compact(size_t max_non_null_offset);
  

@@ -82,14 +86,19 @@
  
    static CHeapBitMap* ro_ptrmap() {
      return _ro_ptrmap;
    }
  
+   static CHeapBitMap* cc_ptrmap() {
+     return _cc_ptrmap;
+   }
+ 
    static void reset_map_and_vs() {
      _ptrmap = nullptr;
      _rw_ptrmap = nullptr;
      _ro_ptrmap = nullptr;
+     _cc_ptrmap = nullptr;
      _vs = nullptr;
    }
  };
  
  // SharedDataRelocator is used to shift pointers in the CDS archive.

@@ -246,10 +255,21 @@
  };
  
  class ArchiveUtils {
  public:
    static void log_to_classlist(BootstrapInfo* bootstrap_specifier, TRAPS) NOT_CDS_RETURN;
+ 
+   template <typename T> static Array<T>* archive_array(GrowableArray<T>* tmp_array);
+ 
+   // Used in logging: "boot", "boot2", "plat", "app" and "unreg";
+   static const char* class_category(Klass* k);
+ 
+   static const char* builtin_loader_name_or_null(oop loader); // "boot", "platform", "app", or nullptr
+   static const char* builtin_loader_name(oop loader); // "boot", "platform", or "app". Asserts if not a built-in-loader.
+ 
+   static bool builtin_loader_from_type(const char* loader_type, oop* value_ret);
+   static oop builtin_loader_from_type(int loader_type);
  };
  
  class HeapRootSegments {
  private:
    size_t _base_offset;
< prev index next >