218 // validate_shared_path_table()
219 // validate_non_existent_class_paths()
220 size_t _shared_path_table_offset;
221 int _shared_path_table_size;
222
223 jshort _app_class_paths_start_index; // Index of first app classpath entry
224 jshort _app_module_paths_start_index; // Index of first module path entry
225 jshort _num_module_paths; // number of module path entries
226 jshort _max_used_path_index; // max path index referenced during CDS dump
227 bool _verify_local; // BytecodeVerificationLocal setting
228 bool _verify_remote; // BytecodeVerificationRemote setting
229 bool _has_platform_or_app_classes; // Archive contains app classes
230 char* _requested_base_address; // Archive relocation is not necessary if we map with this base address.
231 char* _mapped_base_address; // Actual base address where archive is mapped.
232
233 bool _allow_archiving_with_java_agent; // setting of the AllowArchivingWithJavaAgent option
234 bool _use_optimized_module_handling;// No module-relation VM options were specified, so we can skip
235 // some expensive operations.
236 bool _use_full_module_graph; // Can we use the full archived module graph?
237 size_t _ptrmap_size_in_bits; // Size of pointer relocation bitmap
238
239 char* from_mapped_offset(size_t offset) const {
240 return mapped_base_address() + offset;
241 }
242 void set_mapped_offset(char* p, size_t *offset) {
243 assert(p >= mapped_base_address(), "sanity");
244 *offset = p - mapped_base_address();
245 }
246 public:
247 // Accessors -- fields declared in CDSFileMapHeaderBase
248 unsigned int magic() const {return _magic;}
249 int crc() const { return _crc; }
250 int version() const { return _version; }
251
252 void set_crc(int crc_value) { _crc = crc_value; }
253 void set_version(int v) { _version = v; }
254
255 // Accessors -- fields declared in FileMapHeader
256
257 size_t header_size() const { return _header_size; }
258 size_t alignment() const { return _alignment; }
266 address narrow_klass_base() const { return (address)mapped_base_address(); }
267 char* cloned_vtables() const { return from_mapped_offset(_cloned_vtables_offset); }
268 char* serialized_data() const { return from_mapped_offset(_serialized_data_offset); }
269 address i2i_entry_code_buffers() const { return (address)from_mapped_offset(_i2i_entry_code_buffers_offset); }
270 size_t i2i_entry_code_buffers_size() const { return _i2i_entry_code_buffers_size; }
271 address heap_end() const { return _heap_end; }
272 bool base_archive_is_default() const { return _base_archive_is_default; }
273 const char* jvm_ident() const { return _jvm_ident; }
274 size_t base_archive_name_size() const { return _base_archive_name_size; }
275 char* requested_base_address() const { return _requested_base_address; }
276 char* mapped_base_address() const { return _mapped_base_address; }
277 bool has_platform_or_app_classes() const { return _has_platform_or_app_classes; }
278 size_t ptrmap_size_in_bits() const { return _ptrmap_size_in_bits; }
279 bool compressed_oops() const { return _compressed_oops; }
280 bool compressed_class_pointers() const { return _compressed_class_ptrs; }
281 // FIXME: These should really return int
282 jshort max_used_path_index() const { return _max_used_path_index; }
283 jshort app_module_paths_start_index() const { return _app_module_paths_start_index; }
284 jshort app_class_paths_start_index() const { return _app_class_paths_start_index; }
285 jshort num_module_paths() const { return _num_module_paths; }
286
287 void set_has_platform_or_app_classes(bool v) { _has_platform_or_app_classes = v; }
288 void set_cloned_vtables(char* p) { set_mapped_offset(p, &_cloned_vtables_offset); }
289 void set_serialized_data(char* p) { set_mapped_offset(p, &_serialized_data_offset); }
290 void set_base_archive_name_size(size_t s) { _base_archive_name_size = s; }
291 void set_base_archive_is_default(bool b) { _base_archive_is_default = b; }
292 void set_header_size(size_t s) { _header_size = s; }
293 void set_ptrmap_size_in_bits(size_t s) { _ptrmap_size_in_bits = s; }
294 void set_mapped_base_address(char* p) { _mapped_base_address = p; }
295 void set_i2i_entry_code_buffers(address p, size_t s) {
296 set_mapped_offset((char*)p, &_i2i_entry_code_buffers_offset);
297 _i2i_entry_code_buffers_size = s;
298 }
299
300 void set_shared_path_table(SharedPathTable table) {
301 set_mapped_offset((char*)table.table(), &_shared_path_table_offset);
302 _shared_path_table_size = table.size();
303 }
304
305 void set_final_requested_base(char* b) {
306 _requested_base_address = b;
307 _mapped_base_address = 0;
308 }
309
310 SharedPathTable shared_path_table() const {
311 return SharedPathTable((Array<u8>*)from_mapped_offset(_shared_path_table_offset),
312 _shared_path_table_size);
313 }
314
|
218 // validate_shared_path_table()
219 // validate_non_existent_class_paths()
220 size_t _shared_path_table_offset;
221 int _shared_path_table_size;
222
223 jshort _app_class_paths_start_index; // Index of first app classpath entry
224 jshort _app_module_paths_start_index; // Index of first module path entry
225 jshort _num_module_paths; // number of module path entries
226 jshort _max_used_path_index; // max path index referenced during CDS dump
227 bool _verify_local; // BytecodeVerificationLocal setting
228 bool _verify_remote; // BytecodeVerificationRemote setting
229 bool _has_platform_or_app_classes; // Archive contains app classes
230 char* _requested_base_address; // Archive relocation is not necessary if we map with this base address.
231 char* _mapped_base_address; // Actual base address where archive is mapped.
232
233 bool _allow_archiving_with_java_agent; // setting of the AllowArchivingWithJavaAgent option
234 bool _use_optimized_module_handling;// No module-relation VM options were specified, so we can skip
235 // some expensive operations.
236 bool _use_full_module_graph; // Can we use the full archived module graph?
237 size_t _ptrmap_size_in_bits; // Size of pointer relocation bitmap
238 narrowOop _heap_obj_roots; // An objArray that stores all the roots of archived heap objects
239 char* from_mapped_offset(size_t offset) const {
240 return mapped_base_address() + offset;
241 }
242 void set_mapped_offset(char* p, size_t *offset) {
243 assert(p >= mapped_base_address(), "sanity");
244 *offset = p - mapped_base_address();
245 }
246 public:
247 // Accessors -- fields declared in CDSFileMapHeaderBase
248 unsigned int magic() const {return _magic;}
249 int crc() const { return _crc; }
250 int version() const { return _version; }
251
252 void set_crc(int crc_value) { _crc = crc_value; }
253 void set_version(int v) { _version = v; }
254
255 // Accessors -- fields declared in FileMapHeader
256
257 size_t header_size() const { return _header_size; }
258 size_t alignment() const { return _alignment; }
266 address narrow_klass_base() const { return (address)mapped_base_address(); }
267 char* cloned_vtables() const { return from_mapped_offset(_cloned_vtables_offset); }
268 char* serialized_data() const { return from_mapped_offset(_serialized_data_offset); }
269 address i2i_entry_code_buffers() const { return (address)from_mapped_offset(_i2i_entry_code_buffers_offset); }
270 size_t i2i_entry_code_buffers_size() const { return _i2i_entry_code_buffers_size; }
271 address heap_end() const { return _heap_end; }
272 bool base_archive_is_default() const { return _base_archive_is_default; }
273 const char* jvm_ident() const { return _jvm_ident; }
274 size_t base_archive_name_size() const { return _base_archive_name_size; }
275 char* requested_base_address() const { return _requested_base_address; }
276 char* mapped_base_address() const { return _mapped_base_address; }
277 bool has_platform_or_app_classes() const { return _has_platform_or_app_classes; }
278 size_t ptrmap_size_in_bits() const { return _ptrmap_size_in_bits; }
279 bool compressed_oops() const { return _compressed_oops; }
280 bool compressed_class_pointers() const { return _compressed_class_ptrs; }
281 // FIXME: These should really return int
282 jshort max_used_path_index() const { return _max_used_path_index; }
283 jshort app_module_paths_start_index() const { return _app_module_paths_start_index; }
284 jshort app_class_paths_start_index() const { return _app_class_paths_start_index; }
285 jshort num_module_paths() const { return _num_module_paths; }
286 narrowOop heap_obj_roots() const { return _heap_obj_roots; }
287
288 void set_has_platform_or_app_classes(bool v) { _has_platform_or_app_classes = v; }
289 void set_cloned_vtables(char* p) { set_mapped_offset(p, &_cloned_vtables_offset); }
290 void set_serialized_data(char* p) { set_mapped_offset(p, &_serialized_data_offset); }
291 void set_base_archive_name_size(size_t s) { _base_archive_name_size = s; }
292 void set_base_archive_is_default(bool b) { _base_archive_is_default = b; }
293 void set_header_size(size_t s) { _header_size = s; }
294 void set_ptrmap_size_in_bits(size_t s) { _ptrmap_size_in_bits = s; }
295 void set_mapped_base_address(char* p) { _mapped_base_address = p; }
296 void set_heap_obj_roots(narrowOop r) { _heap_obj_roots = r; }
297
298 void set_i2i_entry_code_buffers(address p, size_t s) {
299 set_mapped_offset((char*)p, &_i2i_entry_code_buffers_offset);
300 _i2i_entry_code_buffers_size = s;
301 }
302
303 void set_shared_path_table(SharedPathTable table) {
304 set_mapped_offset((char*)table.table(), &_shared_path_table_offset);
305 _shared_path_table_size = table.size();
306 }
307
308 void set_final_requested_base(char* b) {
309 _requested_base_address = b;
310 _mapped_base_address = 0;
311 }
312
313 SharedPathTable shared_path_table() const {
314 return SharedPathTable((Array<u8>*)from_mapped_offset(_shared_path_table_offset),
315 _shared_path_table_size);
316 }
317
|