614 log_info(cds)("Shared file region %d: " SIZE_FORMAT_HEX_W(08)
615 " bytes, addr " INTPTR_FORMAT " file offset " SIZE_FORMAT_HEX_W(08),
616 region, size, p2i(base), _file_offset);
617 } else {
618 si->_file_offset = _file_offset;
619 }
620 if (MetaspaceShared::is_heap_region(region)) {
621 assert((base - (char*)Universe::narrow_oop_base()) % HeapWordSize == 0, "Sanity");
622 if (base != NULL) {
623 si->_addr._offset = (intx)CompressedOops::encode_not_null((oop)base);
624 } else {
625 si->_addr._offset = 0;
626 }
627 } else {
628 si->_addr._base = base;
629 }
630 si->_used = size;
631 si->_read_only = read_only;
632 si->_allow_exec = allow_exec;
633 si->_crc = ClassLoader::crc32(0, base, (jint)size);
634 write_bytes_aligned(base, (int)size);
635 }
636
637 // Write out the given archive heap memory regions. GC code combines multiple
638 // consecutive archive GC regions into one MemRegion whenever possible and
639 // produces the 'heap_mem' array.
640 //
641 // If the archive heap memory size is smaller than a single dump time GC region
642 // size, there is only one MemRegion in the array.
643 //
644 // If the archive heap memory size is bigger than one dump time GC region size,
645 // the 'heap_mem' array may contain more than one consolidated MemRegions. When
646 // the first/bottom archive GC region is a partial GC region (with the empty
647 // portion at the higher address within the region), one MemRegion is used for
648 // the bottom partial archive GC region. The rest of the consecutive archive
649 // GC regions are combined into another MemRegion.
650 //
651 // Here's the mapping from (archive heap GC regions) -> (GrowableArray<MemRegion> *regions).
652 // + We have 1 or more archive heap regions: ah0, ah1, ah2 ..... ahn
653 // + We have 1 or 2 consolidated heap memory regions: r0 and r1
654 //
|
614 log_info(cds)("Shared file region %d: " SIZE_FORMAT_HEX_W(08)
615 " bytes, addr " INTPTR_FORMAT " file offset " SIZE_FORMAT_HEX_W(08),
616 region, size, p2i(base), _file_offset);
617 } else {
618 si->_file_offset = _file_offset;
619 }
620 if (MetaspaceShared::is_heap_region(region)) {
621 assert((base - (char*)Universe::narrow_oop_base()) % HeapWordSize == 0, "Sanity");
622 if (base != NULL) {
623 si->_addr._offset = (intx)CompressedOops::encode_not_null((oop)base);
624 } else {
625 si->_addr._offset = 0;
626 }
627 } else {
628 si->_addr._base = base;
629 }
630 si->_used = size;
631 si->_read_only = read_only;
632 si->_allow_exec = allow_exec;
633 si->_crc = ClassLoader::crc32(0, base, (jint)size);
634 if (base != NULL) {
635 write_bytes_aligned(base, (int)size);
636 }
637 }
638
639 // Write out the given archive heap memory regions. GC code combines multiple
640 // consecutive archive GC regions into one MemRegion whenever possible and
641 // produces the 'heap_mem' array.
642 //
643 // If the archive heap memory size is smaller than a single dump time GC region
644 // size, there is only one MemRegion in the array.
645 //
646 // If the archive heap memory size is bigger than one dump time GC region size,
647 // the 'heap_mem' array may contain more than one consolidated MemRegions. When
648 // the first/bottom archive GC region is a partial GC region (with the empty
649 // portion at the higher address within the region), one MemRegion is used for
650 // the bottom partial archive GC region. The rest of the consecutive archive
651 // GC regions are combined into another MemRegion.
652 //
653 // Here's the mapping from (archive heap GC regions) -> (GrowableArray<MemRegion> *regions).
654 // + We have 1 or more archive heap regions: ah0, ah1, ah2 ..... ahn
655 // + We have 1 or 2 consolidated heap memory regions: r0 and r1
656 //
|