175 BitMapView ptrmap_view();
176 bool has_ptrmap() { return _ptrmap_size_in_bits != 0; }
177
178 bool check_region_crc() const;
179 void print(outputStream* st, int region_index);
180 };
181
182 class FileMapHeader: private CDSFileMapHeaderBase {
183 friend class CDSConstants;
184 friend class VMStructs;
185
186 private:
187 // The following fields record the states of the VM during dump time.
188 // They are compared with the runtime states to see if the archive
189 // can be used.
190 size_t _core_region_alignment; // how shared archive should be aligned
191 int _obj_alignment; // value of ObjectAlignmentInBytes
192 address _narrow_oop_base; // compressed oop encoding base
193 int _narrow_oop_shift; // compressed oop encoding shift
194 bool _compact_strings; // value of CompactStrings
195 uintx _max_heap_size; // java max heap size during dumping
196 CompressedOops::Mode _narrow_oop_mode; // compressed oop encoding mode
197 int _narrow_klass_shift; // save narrow klass base and shift
198 bool _compressed_oops; // save the flag UseCompressedOops
199 bool _compressed_class_ptrs; // save the flag UseCompressedClassPointers
200 size_t _cloned_vtables_offset; // The address of the first cloned vtable
201 size_t _serialized_data_offset; // Data accessed using {ReadClosure,WriteClosure}::serialize()
202 address _heap_begin; // heap begin at dump time.
203 address _heap_end; // heap end at dump time.
204 bool _has_non_jar_in_classpath; // non-jar file entry exists in classpath
205 unsigned int _common_app_classpath_prefix_size; // size of the common prefix of app class paths
206 // 0 if no common prefix exists
207
208 // The following fields are all sanity checks for whether this archive
209 // will function correctly with this JVM and the bootclasspath it's
210 // invoked with.
211 char _jvm_ident[JVM_IDENT_MAX]; // identifier string of the jvm that created this dump
212
213 // The following is a table of all the boot/app/module path entries that were used
214 // during dumping. At run time, we validate these entries according to their
243 int crc() const { return _generic_header._crc; }
244 int version() const { return _generic_header._version; }
245 unsigned int header_size() const { return _generic_header._header_size; }
246 unsigned int base_archive_name_offset() const { return _generic_header._base_archive_name_offset; }
247 unsigned int base_archive_name_size() const { return _generic_header._base_archive_name_size; }
248 unsigned int common_app_classpath_prefix_size() const { return _common_app_classpath_prefix_size; }
249
250 void set_magic(unsigned int m) { _generic_header._magic = m; }
251 void set_crc(int crc_value) { _generic_header._crc = crc_value; }
252 void set_version(int v) { _generic_header._version = v; }
253 void set_header_size(unsigned int s) { _generic_header._header_size = s; }
254 void set_base_archive_name_offset(unsigned int s) { _generic_header._base_archive_name_offset = s; }
255 void set_base_archive_name_size(unsigned int s) { _generic_header._base_archive_name_size = s; }
256 void set_common_app_classpath_prefix_size(unsigned int s) { _common_app_classpath_prefix_size = s; }
257
258 size_t core_region_alignment() const { return _core_region_alignment; }
259 int obj_alignment() const { return _obj_alignment; }
260 address narrow_oop_base() const { return _narrow_oop_base; }
261 int narrow_oop_shift() const { return _narrow_oop_shift; }
262 bool compact_strings() const { return _compact_strings; }
263 uintx max_heap_size() const { return _max_heap_size; }
264 CompressedOops::Mode narrow_oop_mode() const { return _narrow_oop_mode; }
265 int narrow_klass_shift() const { return _narrow_klass_shift; }
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 heap_begin() const { return _heap_begin; }
270 address heap_end() const { return _heap_end; }
271 const char* jvm_ident() const { return _jvm_ident; }
272 char* requested_base_address() const { return _requested_base_address; }
273 char* mapped_base_address() const { return _mapped_base_address; }
274 bool has_platform_or_app_classes() const { return _has_platform_or_app_classes; }
275 bool has_non_jar_in_classpath() const { return _has_non_jar_in_classpath; }
276 size_t ptrmap_size_in_bits() const { return _ptrmap_size_in_bits; }
277 bool compressed_oops() const { return _compressed_oops; }
278 bool compressed_class_pointers() const { return _compressed_class_ptrs; }
279 // FIXME: These should really return int
280 jshort max_used_path_index() const { return _max_used_path_index; }
281 jshort app_module_paths_start_index() const { return _app_module_paths_start_index; }
282 jshort app_class_paths_start_index() const { return _app_class_paths_start_index; }
|
175 BitMapView ptrmap_view();
176 bool has_ptrmap() { return _ptrmap_size_in_bits != 0; }
177
178 bool check_region_crc() const;
179 void print(outputStream* st, int region_index);
180 };
181
182 class FileMapHeader: private CDSFileMapHeaderBase {
183 friend class CDSConstants;
184 friend class VMStructs;
185
186 private:
187 // The following fields record the states of the VM during dump time.
188 // They are compared with the runtime states to see if the archive
189 // can be used.
190 size_t _core_region_alignment; // how shared archive should be aligned
191 int _obj_alignment; // value of ObjectAlignmentInBytes
192 address _narrow_oop_base; // compressed oop encoding base
193 int _narrow_oop_shift; // compressed oop encoding shift
194 bool _compact_strings; // value of CompactStrings
195 bool _compact_headers; // value of UseCompactObjectHeaders
196 uintx _max_heap_size; // java max heap size during dumping
197 CompressedOops::Mode _narrow_oop_mode; // compressed oop encoding mode
198 int _narrow_klass_shift; // save narrow klass base and shift
199 bool _compressed_oops; // save the flag UseCompressedOops
200 bool _compressed_class_ptrs; // save the flag UseCompressedClassPointers
201 size_t _cloned_vtables_offset; // The address of the first cloned vtable
202 size_t _serialized_data_offset; // Data accessed using {ReadClosure,WriteClosure}::serialize()
203 address _heap_begin; // heap begin at dump time.
204 address _heap_end; // heap end at dump time.
205 bool _has_non_jar_in_classpath; // non-jar file entry exists in classpath
206 unsigned int _common_app_classpath_prefix_size; // size of the common prefix of app class paths
207 // 0 if no common prefix exists
208
209 // The following fields are all sanity checks for whether this archive
210 // will function correctly with this JVM and the bootclasspath it's
211 // invoked with.
212 char _jvm_ident[JVM_IDENT_MAX]; // identifier string of the jvm that created this dump
213
214 // The following is a table of all the boot/app/module path entries that were used
215 // during dumping. At run time, we validate these entries according to their
244 int crc() const { return _generic_header._crc; }
245 int version() const { return _generic_header._version; }
246 unsigned int header_size() const { return _generic_header._header_size; }
247 unsigned int base_archive_name_offset() const { return _generic_header._base_archive_name_offset; }
248 unsigned int base_archive_name_size() const { return _generic_header._base_archive_name_size; }
249 unsigned int common_app_classpath_prefix_size() const { return _common_app_classpath_prefix_size; }
250
251 void set_magic(unsigned int m) { _generic_header._magic = m; }
252 void set_crc(int crc_value) { _generic_header._crc = crc_value; }
253 void set_version(int v) { _generic_header._version = v; }
254 void set_header_size(unsigned int s) { _generic_header._header_size = s; }
255 void set_base_archive_name_offset(unsigned int s) { _generic_header._base_archive_name_offset = s; }
256 void set_base_archive_name_size(unsigned int s) { _generic_header._base_archive_name_size = s; }
257 void set_common_app_classpath_prefix_size(unsigned int s) { _common_app_classpath_prefix_size = s; }
258
259 size_t core_region_alignment() const { return _core_region_alignment; }
260 int obj_alignment() const { return _obj_alignment; }
261 address narrow_oop_base() const { return _narrow_oop_base; }
262 int narrow_oop_shift() const { return _narrow_oop_shift; }
263 bool compact_strings() const { return _compact_strings; }
264 bool compact_headers() const { return _compact_headers; }
265 uintx max_heap_size() const { return _max_heap_size; }
266 CompressedOops::Mode narrow_oop_mode() const { return _narrow_oop_mode; }
267 int narrow_klass_shift() const { return _narrow_klass_shift; }
268 address narrow_klass_base() const { return (address)mapped_base_address(); }
269 char* cloned_vtables() const { return from_mapped_offset(_cloned_vtables_offset); }
270 char* serialized_data() const { return from_mapped_offset(_serialized_data_offset); }
271 address heap_begin() const { return _heap_begin; }
272 address heap_end() const { return _heap_end; }
273 const char* jvm_ident() const { return _jvm_ident; }
274 char* requested_base_address() const { return _requested_base_address; }
275 char* mapped_base_address() const { return _mapped_base_address; }
276 bool has_platform_or_app_classes() const { return _has_platform_or_app_classes; }
277 bool has_non_jar_in_classpath() const { return _has_non_jar_in_classpath; }
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; }
|