< prev index next >

src/hotspot/share/cds/filemap.hpp

Print this page

171   BitMapView ptrmap_view();
172   bool has_ptrmap()                  { return _ptrmap_size_in_bits != 0; }
173 
174   bool check_region_crc(char* base) const;
175   void print(outputStream* st, int region_index);
176 };
177 
178 class FileMapHeader: private CDSFileMapHeaderBase {
179   friend class CDSConstants;
180   friend class VMStructs;
181 
182 private:
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   bool    _compressed_oops;                       // save the flag UseCompressedOops
194   bool    _compressed_class_ptrs;                 // save the flag UseCompressedClassPointers
195   size_t  _cloned_vtables_offset;                 // The address of the first cloned vtable
196   size_t  _serialized_data_offset;                // Data accessed using {ReadClosure,WriteClosure}::serialize()
197   bool _has_non_jar_in_classpath;                 // non-jar file entry exists in classpath
198   unsigned int _common_app_classpath_prefix_size; // size of the common prefix of app class paths
199                                                   //    0 if no common prefix exists
200 
201   // The following fields are all sanity checks for whether this archive
202   // will function correctly with this JVM and the bootclasspath it's
203   // invoked with.
204   char  _jvm_ident[JVM_IDENT_MAX];  // identifier string of the jvm that created this dump
205 
206   // The following is a table of all the boot/app/module path entries that were used
207   // during dumping. At run time, we validate these entries according to their
208   // SharedClassPathEntry::_type. See:
209   //      check_nonempty_dir_in_shared_path_table()
210   //      validate_shared_path_table()

239   int version()                                   const { return _generic_header._version;                  }
240   unsigned int header_size()                      const { return _generic_header._header_size;              }
241   unsigned int base_archive_name_offset()         const { return _generic_header._base_archive_name_offset; }
242   unsigned int base_archive_name_size()           const { return _generic_header._base_archive_name_size;   }
243   unsigned int common_app_classpath_prefix_size() const { return _common_app_classpath_prefix_size;         }
244 
245   void set_magic(unsigned int m)                            { _generic_header._magic = m;                    }
246   void set_crc(int crc_value)                               { _generic_header._crc = crc_value;              }
247   void set_version(int v)                                   { _generic_header._version = v;                  }
248   void set_header_size(unsigned int s)                      { _generic_header._header_size = s;              }
249   void set_base_archive_name_offset(unsigned int s)         { _generic_header._base_archive_name_offset = s; }
250   void set_base_archive_name_size(unsigned int s)           { _generic_header._base_archive_name_size = s;   }
251   void set_common_app_classpath_prefix_size(unsigned int s) { _common_app_classpath_prefix_size = s;         }
252 
253   bool is_static()                         const { return magic() == CDS_ARCHIVE_MAGIC; }
254   size_t core_region_alignment()           const { return _core_region_alignment; }
255   int obj_alignment()                      const { return _obj_alignment; }
256   address narrow_oop_base()                const { return _narrow_oop_base; }
257   int narrow_oop_shift()                   const { return _narrow_oop_shift; }
258   bool compact_strings()                   const { return _compact_strings; }

259   uintx max_heap_size()                    const { return _max_heap_size; }
260   CompressedOops::Mode narrow_oop_mode()   const { return _narrow_oop_mode; }
261   char* cloned_vtables()                   const { return from_mapped_offset(_cloned_vtables_offset); }
262   char* serialized_data()                  const { return from_mapped_offset(_serialized_data_offset); }
263   const char* jvm_ident()                  const { return _jvm_ident; }
264   char* requested_base_address()           const { return _requested_base_address; }
265   char* mapped_base_address()              const { return _mapped_base_address; }
266   bool has_platform_or_app_classes()       const { return _has_platform_or_app_classes; }
267   bool has_non_jar_in_classpath()          const { return _has_non_jar_in_classpath; }
268   size_t ptrmap_size_in_bits()             const { return _ptrmap_size_in_bits; }
269   bool compressed_oops()                   const { return _compressed_oops; }
270   bool compressed_class_pointers()         const { return _compressed_class_ptrs; }
271   size_t heap_roots_offset()               const { return _heap_roots_offset; }
272   // FIXME: These should really return int
273   jshort max_used_path_index()             const { return _max_used_path_index; }
274   jshort app_module_paths_start_index()    const { return _app_module_paths_start_index; }
275   jshort app_class_paths_start_index()     const { return _app_class_paths_start_index; }
276   int    num_module_paths()                const { return _num_module_paths; }
277 
278   void set_has_platform_or_app_classes(bool v)   { _has_platform_or_app_classes = v; }

171   BitMapView ptrmap_view();
172   bool has_ptrmap()                  { return _ptrmap_size_in_bits != 0; }
173 
174   bool check_region_crc(char* base) const;
175   void print(outputStream* st, int region_index);
176 };
177 
178 class FileMapHeader: private CDSFileMapHeaderBase {
179   friend class CDSConstants;
180   friend class VMStructs;
181 
182 private:
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   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   bool _has_non_jar_in_classpath;                 // non-jar file entry exists in classpath
199   unsigned int _common_app_classpath_prefix_size; // size of the common prefix of app class paths
200                                                   //    0 if no common prefix exists
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   // The following is a table of all the boot/app/module path entries that were used
208   // during dumping. At run time, we validate these entries according to their
209   // SharedClassPathEntry::_type. See:
210   //      check_nonempty_dir_in_shared_path_table()
211   //      validate_shared_path_table()

240   int version()                                   const { return _generic_header._version;                  }
241   unsigned int header_size()                      const { return _generic_header._header_size;              }
242   unsigned int base_archive_name_offset()         const { return _generic_header._base_archive_name_offset; }
243   unsigned int base_archive_name_size()           const { return _generic_header._base_archive_name_size;   }
244   unsigned int common_app_classpath_prefix_size() const { return _common_app_classpath_prefix_size;         }
245 
246   void set_magic(unsigned int m)                            { _generic_header._magic = m;                    }
247   void set_crc(int crc_value)                               { _generic_header._crc = crc_value;              }
248   void set_version(int v)                                   { _generic_header._version = v;                  }
249   void set_header_size(unsigned int s)                      { _generic_header._header_size = s;              }
250   void set_base_archive_name_offset(unsigned int s)         { _generic_header._base_archive_name_offset = s; }
251   void set_base_archive_name_size(unsigned int s)           { _generic_header._base_archive_name_size = s;   }
252   void set_common_app_classpath_prefix_size(unsigned int s) { _common_app_classpath_prefix_size = s;         }
253 
254   bool is_static()                         const { return magic() == CDS_ARCHIVE_MAGIC; }
255   size_t core_region_alignment()           const { return _core_region_alignment; }
256   int obj_alignment()                      const { return _obj_alignment; }
257   address narrow_oop_base()                const { return _narrow_oop_base; }
258   int narrow_oop_shift()                   const { return _narrow_oop_shift; }
259   bool compact_strings()                   const { return _compact_strings; }
260   bool compact_headers()                   const { return _compact_headers; }
261   uintx max_heap_size()                    const { return _max_heap_size; }
262   CompressedOops::Mode narrow_oop_mode()   const { return _narrow_oop_mode; }
263   char* cloned_vtables()                   const { return from_mapped_offset(_cloned_vtables_offset); }
264   char* serialized_data()                  const { return from_mapped_offset(_serialized_data_offset); }
265   const char* jvm_ident()                  const { return _jvm_ident; }
266   char* requested_base_address()           const { return _requested_base_address; }
267   char* mapped_base_address()              const { return _mapped_base_address; }
268   bool has_platform_or_app_classes()       const { return _has_platform_or_app_classes; }
269   bool has_non_jar_in_classpath()          const { return _has_non_jar_in_classpath; }
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   size_t heap_roots_offset()               const { return _heap_roots_offset; }
274   // FIXME: These should really return int
275   jshort max_used_path_index()             const { return _max_used_path_index; }
276   jshort app_module_paths_start_index()    const { return _app_module_paths_start_index; }
277   jshort app_class_paths_start_index()     const { return _app_class_paths_start_index; }
278   int    num_module_paths()                const { return _num_module_paths; }
279 
280   void set_has_platform_or_app_classes(bool v)   { _has_platform_or_app_classes = v; }
< prev index next >