517 // The offset of the first core region in the archive, relative to SharedBaseAddress
518 size_t mapping_base_offset() const { return first_core_space()->mapping_offset(); }
519 // The offset of the (exclusive) end of the last core region in this archive, relative to SharedBaseAddress
520 size_t mapping_end_offset() const { return last_core_space()->mapping_end_offset(); }
521
522 char* mapped_base() const { return first_core_space()->mapped_base(); }
523 char* mapped_end() const { return last_core_space()->mapped_end(); }
524
525 intx mapping_delta() const {
526 return header()->mapped_base_address() - header()->requested_base_address();
527 }
528
529 FileMapRegion* first_core_space() const;
530 FileMapRegion* last_core_space() const;
531
532 private:
533 void seek_to_position(size_t pos);
534 char* skip_first_path_entry(const char* path) NOT_CDS_RETURN_(NULL);
535 int num_paths(const char* path) NOT_CDS_RETURN_(0);
536 GrowableArray<const char*>* create_path_array(const char* path) NOT_CDS_RETURN_(NULL);
537 bool fail(const char* msg, const char* name) NOT_CDS_RETURN_(false);
538 bool check_paths(int shared_path_start_idx, int num_paths,
539 GrowableArray<const char*>* rp_array) NOT_CDS_RETURN_(false);
540 bool validate_boot_class_paths() NOT_CDS_RETURN_(false);
541 bool validate_app_class_paths(int shared_app_paths_len) NOT_CDS_RETURN_(false);
542 bool map_heap_data(MemRegion **heap_mem, int first, int max, int* num,
543 bool is_open = false) NOT_CDS_JAVA_HEAP_RETURN_(false);
544 bool region_crc_check(char* buf, size_t size, int expected_crc) NOT_CDS_RETURN_(false);
545 void dealloc_archive_heap_regions(MemRegion* regions, int num, bool is_open) NOT_CDS_JAVA_HEAP_RETURN;
546 void map_heap_regions_impl() NOT_CDS_JAVA_HEAP_RETURN;
547 char* map_relocation_bitmap(size_t& bitmap_size);
548 MapArchiveResult map_region(int i, intx addr_delta, char* mapped_base_address, ReservedSpace rs);
549 bool read_region(int i, char* base, size_t size);
550 bool relocate_pointers(intx addr_delta);
551
552 FileMapRegion* space_at(int i) const {
553 return header()->space_at(i);
554 }
555
556 // The starting address of spc, as calculated with CompressedOop::decode_non_null()
557 address start_address_as_decoded_with_current_oop_encoding_mode(FileMapRegion* spc) {
|
517 // The offset of the first core region in the archive, relative to SharedBaseAddress
518 size_t mapping_base_offset() const { return first_core_space()->mapping_offset(); }
519 // The offset of the (exclusive) end of the last core region in this archive, relative to SharedBaseAddress
520 size_t mapping_end_offset() const { return last_core_space()->mapping_end_offset(); }
521
522 char* mapped_base() const { return first_core_space()->mapped_base(); }
523 char* mapped_end() const { return last_core_space()->mapped_end(); }
524
525 intx mapping_delta() const {
526 return header()->mapped_base_address() - header()->requested_base_address();
527 }
528
529 FileMapRegion* first_core_space() const;
530 FileMapRegion* last_core_space() const;
531
532 private:
533 void seek_to_position(size_t pos);
534 char* skip_first_path_entry(const char* path) NOT_CDS_RETURN_(NULL);
535 int num_paths(const char* path) NOT_CDS_RETURN_(0);
536 GrowableArray<const char*>* create_path_array(const char* path) NOT_CDS_RETURN_(NULL);
537 bool classpath_failure(const char* msg, const char* name) NOT_CDS_RETURN_(false);
538 bool check_paths(int shared_path_start_idx, int num_paths,
539 GrowableArray<const char*>* rp_array) NOT_CDS_RETURN_(false);
540 bool validate_boot_class_paths() NOT_CDS_RETURN_(false);
541 bool validate_app_class_paths(int shared_app_paths_len) NOT_CDS_RETURN_(false);
542 bool map_heap_data(MemRegion **heap_mem, int first, int max, int* num,
543 bool is_open = false) NOT_CDS_JAVA_HEAP_RETURN_(false);
544 bool region_crc_check(char* buf, size_t size, int expected_crc) NOT_CDS_RETURN_(false);
545 void dealloc_archive_heap_regions(MemRegion* regions, int num, bool is_open) NOT_CDS_JAVA_HEAP_RETURN;
546 void map_heap_regions_impl() NOT_CDS_JAVA_HEAP_RETURN;
547 char* map_relocation_bitmap(size_t& bitmap_size);
548 MapArchiveResult map_region(int i, intx addr_delta, char* mapped_base_address, ReservedSpace rs);
549 bool read_region(int i, char* base, size_t size);
550 bool relocate_pointers(intx addr_delta);
551
552 FileMapRegion* space_at(int i) const {
553 return header()->space_at(i);
554 }
555
556 // The starting address of spc, as calculated with CompressedOop::decode_non_null()
557 address start_address_as_decoded_with_current_oop_encoding_mode(FileMapRegion* spc) {
|