src/hotspot/share/memory/filemap.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/hotspot/share/memory/filemap.hpp Mon Apr 9 12:06:41 2018
--- new/src/hotspot/share/memory/filemap.hpp Mon Apr 9 12:06:41 2018
*** 51,61 ****
--- 51,61 ----
Array<u1>* _manifest;
public:
void init(const char* name, TRAPS);
void metaspace_pointers_do(MetaspaceClosure* it);
! bool validate(bool is_class_path = true);
// The _timestamp only gets set for jar files and "modules" jimage.
bool is_jar_or_bootimage() {
return _timestamp != 0;
}
*** 83,96 ****
--- 83,96 ----
bool _file_open;
int _fd;
size_t _file_offset;
private:
! static Array<u8>* _classpath_entry_table;
! static int _classpath_entry_table_size;
! static size_t _classpath_entry_size;
! static bool _validating_classpath_entry_table;
! static Array<u8>* _shared_path_table;
! static int _shared_path_table_size;
! static size_t _shared_path_entry_size;
! static bool _validating_shared_path_table;
// FileMapHeader describes the shared space data in the file to be
// mapped. This structure gets written to a file. It is not a class, so
// that the compilers don't add any compiler-private data to it.
*** 151,161 ****
--- 151,161 ----
// The _paths_misc_info data is stored as a byte array in the archive file header,
// immediately after the _header field. This information is used only when
// checking the validity of the archive and is deallocated after the archive is loaded.
//
// Note that the _paths_misc_info does NOT include information for JAR files
! // that existed during dump time. Their information is stored in _classpath_entry_table.
! // that existed during dump time. Their information is stored in _shared_path_table.
int _paths_misc_info_size;
// The following is a table of all the class path entries that were used
// during dumping. At run time, we require these files to exist and have the same
// size/modification time, or else the archive will refuse to load.
*** 165,177 ****
--- 165,177 ----
// it is checked by the _paths_misc_info as described above.
//
// FIXME -- if JAR files in the tail of the list were specified but not used during dumping,
// they should be removed from this table, to save space and to avoid spurious
// loading failures during runtime.
! int _classpath_entry_table_size;
! size_t _classpath_entry_size;
! Array<u8>* _classpath_entry_table;
! int _shared_path_table_size;
! size_t _shared_path_entry_size;
! Array<u8>* _shared_path_table;
char* region_addr(int idx);
virtual bool validate();
virtual void populate(FileMapInfo* info, size_t alignment);
*** 268,296 ****
--- 268,297 ----
void print_shared_spaces() NOT_CDS_RETURN;
// Stop CDS sharing and unmap CDS regions.
static void stop_sharing_and_unmap(const char* msg);
! static void allocate_classpath_entry_table();
! bool validate_classpath_entry_table();
! static void allocate_shared_path_table();
! bool validate_shared_path_table();
! static SharedClassPathEntry* shared_classpath(int index) {
! static SharedClassPathEntry* shared_path(int index) {
if (index < 0) {
return NULL;
}
! assert(index < _classpath_entry_table_size, "sanity");
! char* p = (char*)_classpath_entry_table->data();
! p += _classpath_entry_size * index;
! assert(index < _shared_path_table_size, "sanity");
! char* p = (char*)_shared_path_table->data();
! p += _shared_path_entry_size * index;
return (SharedClassPathEntry*)p;
}
static const char* shared_classpath_name(int index) {
+
+ static const char* shared_path_name(int index) {
assert(index >= 0, "Sanity");
! return shared_classpath(index)->name();
! return shared_path(index)->name();
}
! static int get_number_of_share_classpaths() {
! return _classpath_entry_table_size;
! static int get_number_of_shared_paths() {
! return _shared_path_table_size;
}
private:
bool map_heap_data(MemRegion **heap_mem, int first, int max, int* num,
bool is_open = false) NOT_CDS_JAVA_HEAP_RETURN_(false);
src/hotspot/share/memory/filemap.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File