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.
287 static inline bool archive_check_enabled();
288 };
289
290 #endif // SHARE_VM_GC_G1_G1ALLOCATOR_HPP
|
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_archived_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.
287 static inline bool archive_check_enabled();
288 };
289
290 #endif // SHARE_VM_GC_G1_G1ALLOCATOR_HPP
|