--- a/src/hotspot/share/gc/g1/g1Allocator.inline.hpp Fri Nov 23 11:07:54 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1Allocator.inline.hpp Fri Nov 23 10:57:07 2018 +0100
@@ -109,6 +109,10 @@
// Set the regions containing the specified address range as archive.
inline void G1ArchiveAllocator::set_range_archive(MemRegion range, bool open) {
assert(_archive_check_enabled, "archive range check not enabled");
+ log_info(gc, cds)("Mark %s archive regions in map: [" PTR_FORMAT ", " PTR_FORMAT "]",
+ open ? "open" : "closed",
+ p2i(range.start()),
+ p2i(range.last()));
if (open) {
_open_archive_region_map.set_by_address(range, true);
} else {
@@ -116,6 +120,20 @@
}
}
+// Clear the archive regions map containing the specified address range.
+inline void G1ArchiveAllocator::clear_range_archive(MemRegion range, bool open) {
+ assert(_archive_check_enabled, "archive range check not enabled");
+ log_info(gc, cds)("Clear %s archive regions in map: [" PTR_FORMAT ", " PTR_FORMAT "]",
+ open ? "open" : "closed",
+ p2i(range.start()),
+ p2i(range.last()));
+ if (open) {
+ _open_archive_region_map.set_by_address(range, false);
+ } else {
+ _closed_archive_region_map.set_by_address(range, false);
+ }
+}
+
// Check if an object is in a closed archive region using the _archive_region_map.
inline bool G1ArchiveAllocator::in_closed_archive_range(oop object) {
// This is the out-of-line part of is_closed_archive_object test, done separately