< prev index next >

src/hotspot/share/gc/g1/g1Allocator.hpp

Print this page
rev 51611 : 8214118: HeapRegions marked as archive even if CDS mapping fails
Reviewed-by: tschatzl, jiangli


 245   // aligning to the requested alignment.
 246   void complete_archive(GrowableArray<MemRegion>* ranges,
 247                         size_t end_alignment_in_bytes);
 248 
 249   // The number of bytes allocated by this allocator.
 250   size_t used() {
 251     return _summary_bytes_used;
 252   }
 253 
 254   // Clear the count of bytes allocated in prior G1 regions. This
 255   // must be done when recalculate_use is used to reset the counter
 256   // for the generic allocator, since it counts bytes in all G1
 257   // regions, including those still associated with this allocator.
 258   void clear_used() {
 259     _summary_bytes_used = 0;
 260   }
 261 
 262   // Create the _archive_region_map which is used to identify archive objects.
 263   static inline void enable_archive_object_check();
 264 
 265   // Set the regions containing the specified address range as archive/non-archive.
 266   static inline void set_range_archive(MemRegion range, bool open);

 267 
 268   // Check if the object is in closed archive
 269   static inline bool is_closed_archive_object(oop object);
 270   // Check if the object is in open archive
 271   static inline bool is_open_archive_object(oop object);
 272   // Check if the object is either in closed archive or open archive
 273   static inline bool is_archive_object(oop object);
 274 
 275 private:
 276   static bool _archive_check_enabled;
 277   static G1ArchiveRegionMap  _closed_archive_region_map;
 278   static G1ArchiveRegionMap  _open_archive_region_map;
 279 
 280   // Check if an object is in a closed archive region using the _closed_archive_region_map.
 281   static inline bool in_closed_archive_range(oop object);
 282   // Check if an object is in open archive region using the _open_archive_region_map.
 283   static inline bool in_open_archive_range(oop object);
 284 
 285   // Check if archive object checking is enabled, to avoid calling in_open/closed_archive_range
 286   // unnecessarily.


 245   // aligning to the requested alignment.
 246   void complete_archive(GrowableArray<MemRegion>* ranges,
 247                         size_t end_alignment_in_bytes);
 248 
 249   // The number of bytes allocated by this allocator.
 250   size_t used() {
 251     return _summary_bytes_used;
 252   }
 253 
 254   // Clear the count of bytes allocated in prior G1 regions. This
 255   // must be done when recalculate_use is used to reset the counter
 256   // for the generic allocator, since it counts bytes in all G1
 257   // regions, including those still associated with this allocator.
 258   void clear_used() {
 259     _summary_bytes_used = 0;
 260   }
 261 
 262   // Create the _archive_region_map which is used to identify archive objects.
 263   static inline void enable_archive_object_check();
 264 
 265   // Mark regions containing the specified address range as archive/non-archive.
 266   static inline void set_range_archive(MemRegion range, bool open);
 267   static inline void clear_range_archive(MemRegion range, bool open);
 268 
 269   // Check if the object is in closed archive
 270   static inline bool is_closed_archive_object(oop object);
 271   // Check if the object is in open archive
 272   static inline bool is_open_archive_object(oop object);
 273   // Check if the object is either in closed archive or open archive
 274   static inline bool is_archive_object(oop object);
 275 
 276 private:
 277   static bool _archive_check_enabled;
 278   static G1ArchiveRegionMap  _closed_archive_region_map;
 279   static G1ArchiveRegionMap  _open_archive_region_map;
 280 
 281   // Check if an object is in a closed archive region using the _closed_archive_region_map.
 282   static inline bool in_closed_archive_range(oop object);
 283   // Check if an object is in open archive region using the _open_archive_region_map.
 284   static inline bool in_open_archive_range(oop object);
 285 
 286   // Check if archive object checking is enabled, to avoid calling in_open/closed_archive_range
 287   // unnecessarily.
< prev index next >