< prev index next >

src/hotspot/share/cds/filemap.hpp

Print this page

171     _oopmap_size_in_bits = size_in_bits;
172   }
173 
174   void print(outputStream* st, int region_index);
175 };
176 
177 class FileMapHeader: private CDSFileMapHeaderBase {
178   friend class CDSOffsets;
179   friend class VMStructs;
180 
181   size_t _header_size;
182 
183   // The following fields record the states of the VM during dump time.
184   // They are compared with the runtime states to see if the archive
185   // can be used.
186   size_t _core_region_alignment;    // how shared archive should be aligned
187   int    _obj_alignment;            // value of ObjectAlignmentInBytes
188   address _narrow_oop_base;         // compressed oop encoding base
189   int    _narrow_oop_shift;         // compressed oop encoding shift
190   bool   _compact_strings;          // value of CompactStrings

191   uintx  _max_heap_size;            // java max heap size during dumping
192   CompressedOops::Mode _narrow_oop_mode; // compressed oop encoding mode
193   int     _narrow_klass_shift;      // save narrow klass base and shift
194   bool    _compressed_oops;         // save the flag UseCompressedOops
195   bool    _compressed_class_ptrs;   // save the flag UseCompressedClassPointers
196   size_t  _cloned_vtables_offset;   // The address of the first cloned vtable
197   size_t  _serialized_data_offset;  // Data accessed using {ReadClosure,WriteClosure}::serialize()
198   address _heap_begin;              // heap begin at dump time.
199   address _heap_end;                // heap end at dump time.
200   bool _base_archive_is_default;    // indicates if the base archive is the system default one
201 
202   // The following fields are all sanity checks for whether this archive
203   // will function correctly with this JVM and the bootclasspath it's
204   // invoked with.
205   char  _jvm_ident[JVM_IDENT_MAX];  // identifier string of the jvm that created this dump
206 
207   // size of the base archive name including NULL terminator
208   size_t _base_archive_name_size;
209 
210   // The following is a table of all the boot/app/module path entries that were used

236     return mapped_base_address() + offset;
237   }
238   void set_as_offset(char* p, size_t *offset);
239 public:
240   // Accessors -- fields declared in CDSFileMapHeaderBase
241   unsigned int magic()                    const { return _magic; }
242   int crc()                               const { return _crc; }
243   int version()                           const { return _version; }
244 
245   void set_crc(int crc_value)                   { _crc = crc_value; }
246   void set_version(int v)                       { _version = v; }
247 
248   // Accessors -- fields declared in FileMapHeader
249 
250   size_t header_size()                     const { return _header_size; }
251   size_t core_region_alignment()           const { return _core_region_alignment; }
252   int obj_alignment()                      const { return _obj_alignment; }
253   address narrow_oop_base()                const { return _narrow_oop_base; }
254   int narrow_oop_shift()                   const { return _narrow_oop_shift; }
255   bool compact_strings()                   const { return _compact_strings; }

256   uintx max_heap_size()                    const { return _max_heap_size; }
257   CompressedOops::Mode narrow_oop_mode()   const { return _narrow_oop_mode; }
258   int narrow_klass_shift()                 const { return _narrow_klass_shift; }
259   address narrow_klass_base()              const { return (address)mapped_base_address(); }
260   char* cloned_vtables()                   const { return from_mapped_offset(_cloned_vtables_offset); }
261   char* serialized_data()                  const { return from_mapped_offset(_serialized_data_offset); }
262   address heap_begin()                     const { return _heap_begin; }
263   address heap_end()                       const { return _heap_end; }
264   bool base_archive_is_default()           const { return _base_archive_is_default; }
265   const char* jvm_ident()                  const { return _jvm_ident; }
266   size_t base_archive_name_size()          const { return _base_archive_name_size; }
267   char* requested_base_address()           const { return _requested_base_address; }
268   char* mapped_base_address()              const { return _mapped_base_address; }
269   bool has_platform_or_app_classes()       const { return _has_platform_or_app_classes; }
270   size_t ptrmap_size_in_bits()             const { return _ptrmap_size_in_bits; }
271   bool compressed_oops()                   const { return _compressed_oops; }
272   bool compressed_class_pointers()         const { return _compressed_class_ptrs; }
273   // FIXME: These should really return int
274   jshort max_used_path_index()             const { return _max_used_path_index; }
275   jshort app_module_paths_start_index()    const { return _app_module_paths_start_index; }

171     _oopmap_size_in_bits = size_in_bits;
172   }
173 
174   void print(outputStream* st, int region_index);
175 };
176 
177 class FileMapHeader: private CDSFileMapHeaderBase {
178   friend class CDSOffsets;
179   friend class VMStructs;
180 
181   size_t _header_size;
182 
183   // The following fields record the states of the VM during dump time.
184   // They are compared with the runtime states to see if the archive
185   // can be used.
186   size_t _core_region_alignment;    // how shared archive should be aligned
187   int    _obj_alignment;            // value of ObjectAlignmentInBytes
188   address _narrow_oop_base;         // compressed oop encoding base
189   int    _narrow_oop_shift;         // compressed oop encoding shift
190   bool   _compact_strings;          // value of CompactStrings
191   bool   _compact_headers;          // value of UseCompactObjectHeaders
192   uintx  _max_heap_size;            // java max heap size during dumping
193   CompressedOops::Mode _narrow_oop_mode; // compressed oop encoding mode
194   int     _narrow_klass_shift;      // save narrow klass base and shift
195   bool    _compressed_oops;         // save the flag UseCompressedOops
196   bool    _compressed_class_ptrs;   // save the flag UseCompressedClassPointers
197   size_t  _cloned_vtables_offset;   // The address of the first cloned vtable
198   size_t  _serialized_data_offset;  // Data accessed using {ReadClosure,WriteClosure}::serialize()
199   address _heap_begin;              // heap begin at dump time.
200   address _heap_end;                // heap end at dump time.
201   bool _base_archive_is_default;    // indicates if the base archive is the system default one
202 
203   // The following fields are all sanity checks for whether this archive
204   // will function correctly with this JVM and the bootclasspath it's
205   // invoked with.
206   char  _jvm_ident[JVM_IDENT_MAX];  // identifier string of the jvm that created this dump
207 
208   // size of the base archive name including NULL terminator
209   size_t _base_archive_name_size;
210 
211   // The following is a table of all the boot/app/module path entries that were used

237     return mapped_base_address() + offset;
238   }
239   void set_as_offset(char* p, size_t *offset);
240 public:
241   // Accessors -- fields declared in CDSFileMapHeaderBase
242   unsigned int magic()                    const { return _magic; }
243   int crc()                               const { return _crc; }
244   int version()                           const { return _version; }
245 
246   void set_crc(int crc_value)                   { _crc = crc_value; }
247   void set_version(int v)                       { _version = v; }
248 
249   // Accessors -- fields declared in FileMapHeader
250 
251   size_t header_size()                     const { return _header_size; }
252   size_t core_region_alignment()           const { return _core_region_alignment; }
253   int obj_alignment()                      const { return _obj_alignment; }
254   address narrow_oop_base()                const { return _narrow_oop_base; }
255   int narrow_oop_shift()                   const { return _narrow_oop_shift; }
256   bool compact_strings()                   const { return _compact_strings; }
257   bool compact_headers()                   const { return _compact_headers; }
258   uintx max_heap_size()                    const { return _max_heap_size; }
259   CompressedOops::Mode narrow_oop_mode()   const { return _narrow_oop_mode; }
260   int narrow_klass_shift()                 const { return _narrow_klass_shift; }
261   address narrow_klass_base()              const { return (address)mapped_base_address(); }
262   char* cloned_vtables()                   const { return from_mapped_offset(_cloned_vtables_offset); }
263   char* serialized_data()                  const { return from_mapped_offset(_serialized_data_offset); }
264   address heap_begin()                     const { return _heap_begin; }
265   address heap_end()                       const { return _heap_end; }
266   bool base_archive_is_default()           const { return _base_archive_is_default; }
267   const char* jvm_ident()                  const { return _jvm_ident; }
268   size_t base_archive_name_size()          const { return _base_archive_name_size; }
269   char* requested_base_address()           const { return _requested_base_address; }
270   char* mapped_base_address()              const { return _mapped_base_address; }
271   bool has_platform_or_app_classes()       const { return _has_platform_or_app_classes; }
272   size_t ptrmap_size_in_bits()             const { return _ptrmap_size_in_bits; }
273   bool compressed_oops()                   const { return _compressed_oops; }
274   bool compressed_class_pointers()         const { return _compressed_class_ptrs; }
275   // FIXME: These should really return int
276   jshort max_used_path_index()             const { return _max_used_path_index; }
277   jshort app_module_paths_start_index()    const { return _app_module_paths_start_index; }
< prev index next >