< prev index next >

src/hotspot/share/cds/filemap.hpp

Print this page

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

190   uintx  _max_heap_size;                          // java max heap size during dumping
191   CompressedOops::Mode _narrow_oop_mode;          // compressed oop encoding mode
192   int     _narrow_klass_shift;                    // save narrow klass base and shift
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   address _heap_begin;                            // heap begin at dump time.
198   address _heap_end;                              // heap end at dump time.
199   bool _has_non_jar_in_classpath;                 // non-jar file entry exists in classpath
200   unsigned int _common_app_classpath_prefix_size; // size of the common prefix of app class paths
201                                                   //    0 if no common prefix exists
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   // The following is a table of all the boot/app/module path entries that were used
209   // during dumping. At run time, we validate these entries according to their

238   int crc()                                       const { return _generic_header._crc;                      }
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   size_t core_region_alignment()           const { return _core_region_alignment; }
254   int obj_alignment()                      const { return _obj_alignment; }
255   address narrow_oop_base()                const { return _narrow_oop_base; }
256   int narrow_oop_shift()                   const { return _narrow_oop_shift; }
257   bool compact_strings()                   const { return _compact_strings; }

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   const char* jvm_ident()                  const { return _jvm_ident; }
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   bool has_non_jar_in_classpath()          const { return _has_non_jar_in_classpath; }
271   size_t ptrmap_size_in_bits()             const { return _ptrmap_size_in_bits; }
272   bool compressed_oops()                   const { return _compressed_oops; }
273   bool compressed_class_pointers()         const { return _compressed_class_ptrs; }
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; }

170   BitMapView ptrmap_view();
171   bool has_ptrmap()                  { return _ptrmap_size_in_bits != 0; }
172 
173   bool check_region_crc() const;
174   void print(outputStream* st, int region_index);
175 };
176 
177 class FileMapHeader: private CDSFileMapHeaderBase {
178   friend class CDSConstants;
179   friend class VMStructs;
180 
181 private:
182   // The following fields record the states of the VM during dump time.
183   // They are compared with the runtime states to see if the archive
184   // can be used.
185   size_t _core_region_alignment;                  // how shared archive should be aligned
186   int    _obj_alignment;                          // value of ObjectAlignmentInBytes
187   address _narrow_oop_base;                       // compressed oop encoding base
188   int    _narrow_oop_shift;                       // compressed oop encoding shift
189   bool   _compact_strings;                        // value of CompactStrings
190   bool   _compact_headers;                        // value of UseCompactObjectHeaders
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 _has_non_jar_in_classpath;                 // non-jar file entry exists in classpath
201   unsigned int _common_app_classpath_prefix_size; // size of the common prefix of app class paths
202                                                   //    0 if no common prefix exists
203 
204   // The following fields are all sanity checks for whether this archive
205   // will function correctly with this JVM and the bootclasspath it's
206   // invoked with.
207   char  _jvm_ident[JVM_IDENT_MAX];  // identifier string of the jvm that created this dump
208 
209   // The following is a table of all the boot/app/module path entries that were used
210   // during dumping. At run time, we validate these entries according to their

239   int crc()                                       const { return _generic_header._crc;                      }
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   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   bool compact_headers()                   const { return _compact_headers; }
260   uintx max_heap_size()                    const { return _max_heap_size; }
261   CompressedOops::Mode narrow_oop_mode()   const { return _narrow_oop_mode; }
262   int narrow_klass_shift()                 const { return _narrow_klass_shift; }
263   address narrow_klass_base()              const { return (address)mapped_base_address(); }
264   char* cloned_vtables()                   const { return from_mapped_offset(_cloned_vtables_offset); }
265   char* serialized_data()                  const { return from_mapped_offset(_serialized_data_offset); }
266   address heap_begin()                     const { return _heap_begin; }
267   address heap_end()                       const { return _heap_end; }
268   const char* jvm_ident()                  const { return _jvm_ident; }
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   bool has_non_jar_in_classpath()          const { return _has_non_jar_in_classpath; }
273   size_t ptrmap_size_in_bits()             const { return _ptrmap_size_in_bits; }
274   bool compressed_oops()                   const { return _compressed_oops; }
275   bool compressed_class_pointers()         const { return _compressed_class_ptrs; }
276   // FIXME: These should really return int
277   jshort max_used_path_index()             const { return _max_used_path_index; }
278   jshort app_module_paths_start_index()    const { return _app_module_paths_start_index; }
279   jshort app_class_paths_start_index()     const { return _app_class_paths_start_index; }
< prev index next >