class FileMapInfo; struct LoadedArchiveHeapRegion;
class ArchiveHeapLoader : AllStatic { public: // At runtime, heap regions in the CDS archive can be used in two different ways, // depending on the GC type: // - Mapped: (G1 only) the regions are directly mapped into the Java heap // - Loaded: At VM start-up, the objects in the heap regions are copied into the // Java heap. This is easier to implement than mapping but // slightly less efficient, as the embedded pointers need to be relocated. staticbool can_use() { return can_map() || can_load(); }
// Can this VM map archived heap regions? Currently only G1+compressed{oops,cp} staticbool can_map() {
CDS_JAVA_HEAP_ONLY(return (UseG1GC && UseCompressedClassPointers);)
NOT_CDS_JAVA_HEAP(returnfalse;)
} staticbool is_mapped() { return closed_regions_mapped() && open_regions_mapped();
}
// Can this VM load the objects from archived heap regions into the heap at start-up? staticbool can_load() NOT_CDS_JAVA_HEAP_RETURN_(false); staticvoid finish_initialization() NOT_CDS_JAVA_HEAP_RETURN; staticbool is_loaded() {
CDS_JAVA_HEAP_ONLY(return _is_loaded;)
NOT_CDS_JAVA_HEAP(returnfalse;)
}
// NarrowOops stored in the CDS archive may use a different encoding scheme // than CompressedOops::{base,shift} -- see FileMapInfo::map_heap_regions_impl. // To decode them, do not use CompressedOops::decode_not_null. Use this // function instead. inlinestatic oop decode_from_archive(narrowOop v) NOT_CDS_JAVA_HEAP_RETURN_(NULL);
// UseCompressedOops only: Used by decode_from_archive staticbool _narrow_oop_base_initialized; static address _narrow_oop_base; staticint _narrow_oop_shift;
// is_mapped() only: the mapped address of each region is offset by this amount from // their requested address. static ptrdiff_t _mapped_heap_delta; staticbool _mapped_heap_relocation_initialized;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.