src/hotspot/share/gc/g1/g1Allocator.inline.hpp
changeset 52674 c9325aa887da
parent 52062 8dbf1a13af49
child 53116 bb03098c4dde
equal deleted inserted replaced
52673:61b3b58a1d1d 52674:c9325aa887da
   107 }
   107 }
   108 
   108 
   109 // Set the regions containing the specified address range as archive.
   109 // Set the regions containing the specified address range as archive.
   110 inline void G1ArchiveAllocator::set_range_archive(MemRegion range, bool open) {
   110 inline void G1ArchiveAllocator::set_range_archive(MemRegion range, bool open) {
   111   assert(_archive_check_enabled, "archive range check not enabled");
   111   assert(_archive_check_enabled, "archive range check not enabled");
       
   112   log_info(gc, cds)("Mark %s archive regions in map: [" PTR_FORMAT ", " PTR_FORMAT "]",
       
   113                      open ? "open" : "closed",
       
   114                      p2i(range.start()),
       
   115                      p2i(range.last()));
   112   if (open) {
   116   if (open) {
   113     _open_archive_region_map.set_by_address(range, true);
   117     _open_archive_region_map.set_by_address(range, true);
   114   } else {
   118   } else {
   115     _closed_archive_region_map.set_by_address(range, true);
   119     _closed_archive_region_map.set_by_address(range, true);
       
   120   }
       
   121 }
       
   122 
       
   123 // Clear the archive regions map containing the specified address range.
       
   124 inline void G1ArchiveAllocator::clear_range_archive(MemRegion range, bool open) {
       
   125   assert(_archive_check_enabled, "archive range check not enabled");
       
   126   log_info(gc, cds)("Clear %s archive regions in map: [" PTR_FORMAT ", " PTR_FORMAT "]",
       
   127                     open ? "open" : "closed",
       
   128                     p2i(range.start()),
       
   129                     p2i(range.last()));
       
   130   if (open) {
       
   131     _open_archive_region_map.set_by_address(range, false);
       
   132   } else {
       
   133     _closed_archive_region_map.set_by_address(range, false);
   116   }
   134   }
   117 }
   135 }
   118 
   136 
   119 // Check if an object is in a closed archive region using the _archive_region_map.
   137 // Check if an object is in a closed archive region using the _archive_region_map.
   120 inline bool G1ArchiveAllocator::in_closed_archive_range(oop object) {
   138 inline bool G1ArchiveAllocator::in_closed_archive_range(oop object) {