< prev index next >
src/hotspot/share/memory/filemap.hpp
Print this page
*** 47,56 ****
--- 47,57 ----
bool _is_dir;
time_t _timestamp; // jar/jimage timestamp, 0 if is directory or other
long _filesize; // jar/jimage file size, -1 if is directory, -2 if other
Array<char>* _name;
Array<u1>* _manifest;
+ bool _is_signed;
public:
void init(const char* name, TRAPS);
void metaspace_pointers_do(MetaspaceClosure* it);
bool validate(bool is_class_path = true);
*** 68,77 ****
--- 69,87 ----
return (_manifest == NULL) ? NULL : (const char*)_manifest->data();
}
int manifest_size() const {
return (_manifest == NULL) ? 0 : _manifest->length();
}
+ void set_manifest(Array<u1>* manifest) {
+ _manifest = manifest;
+ }
+ void set_is_signed(bool s) {
+ _is_signed = s;
+ }
+ bool is_signed() {
+ return _is_signed;
+ }
};
class FileMapInfo : public CHeapObj<mtInternal> {
private:
friend class ManifestStream;
*** 94,107 ****
// 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.
public:
! struct FileMapHeaderBase : public CHeapObj<mtClass> {
! virtual bool validate() = 0;
! virtual void populate(FileMapInfo* info, size_t alignment) = 0;
! };
struct FileMapHeader : FileMapHeaderBase {
// Use data() and data_size() to memcopy to/from the FileMapHeader. We need to
// avoid read/writing the C++ vtable pointer.
static size_t data_size();
char* data() {
--- 104,114 ----
// 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.
public:
! struct FileMapHeaderBase : public CHeapObj<mtClass> { };
struct FileMapHeader : FileMapHeaderBase {
// Use data() and data_size() to memcopy to/from the FileMapHeader. We need to
// avoid read/writing the C++ vtable pointer.
static size_t data_size();
char* data() {
*** 144,154 ****
// invoked with.
char _jvm_ident[JVM_IDENT_MAX]; // identifier for jvm
// The _paths_misc_info is a variable-size structure that records "miscellaneous"
// information during dumping. It is generated and validated by the
! // SharedPathsMiscInfo class. See SharedPathsMiscInfo.hpp and sharedClassUtil.hpp for
// detailed description.
//
// 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.
--- 151,161 ----
// invoked with.
char _jvm_ident[JVM_IDENT_MAX]; // identifier for jvm
// The _paths_misc_info is a variable-size structure that records "miscellaneous"
// information during dumping. It is generated and validated by the
! // SharedPathsMiscInfo class. See SharedPathsMiscInfo.hpp for
// detailed description.
//
// 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.
*** 170,183 ****
// loading failures during runtime.
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);
int compute_crc();
};
FileMapHeader * _header;
--- 177,201 ----
// loading failures during runtime.
int _shared_path_table_size;
size_t _shared_path_entry_size;
Array<u8>* _shared_path_table;
+ jshort _app_class_paths_start_index; // Index of first app classpath entry
+ jshort _app_module_paths_start_index; // Index of first module path entry
+ bool _verify_local; // BytecodeVerificationLocal setting
+ bool _verify_remote; // BytecodeVerificationRemote setting
+ bool _has_platform_or_app_classes; // Archive contains app classes
+
+ void set_has_platform_or_app_classes(bool v) {
+ _has_platform_or_app_classes = v;
+ }
+ bool has_platform_or_app_classes() { return _has_platform_or_app_classes; }
+
char* region_addr(int idx);
! bool validate();
! void populate(FileMapInfo* info, size_t alignment);
int compute_crc();
};
FileMapHeader * _header;
*** 272,281 ****
--- 290,300 ----
static void stop_sharing_and_unmap(const char* msg);
static void allocate_shared_path_table();
static void check_nonempty_dir_in_shared_path_table();
bool validate_shared_path_table();
+ static void update_shared_classpath(ClassPathEntry *cpe, SharedClassPathEntry* ent, TRAPS);
static SharedClassPathEntry* shared_path(int index) {
if (index < 0) {
return NULL;
}
< prev index next >