--- old/src/share/vm/gc/g1/g1MarkSweep.hpp 2015-06-11 15:13:23.262127418 -0400 +++ new/src/share/vm/gc/g1/g1MarkSweep.hpp 2015-06-11 15:13:21.898049402 -0400 @@ -55,11 +55,17 @@ static STWGCTimer* gc_timer() { return GenMarkSweep::_gc_timer; } static SerialOldTracer* gc_tracer() { return GenMarkSweep::_gc_tracer; } - // Support for 'archive' objects, to prevent objects in archive regions - // from being marked by full GCs. + // Create the _archive_region_map which is used to identify archive objects. static void enable_archive_object_check(); - static void mark_range_archive(HeapWord* start, HeapWord* end); + + // Mark the regions containing the specified address range as archive regions. + static void mark_range_archive(MemRegion range); + + // Check if an object is in an archive region using the _archive_region_map. static bool in_archive_range(oop object); + + // Check if archive object checking is enabled, to avoid calling in_archive_range + // unnecessarily. static bool archive_check_enabled() { return G1MarkSweep::_archive_check_enabled; } private: @@ -103,6 +109,9 @@ bool doHeapRegion(HeapRegion* hr); }; +// G1ArchiveRegionMap is a boolean array used to mark G1 regions as +// archive regions. This allows a quick check for whether an object +// should not be marked because it is in an archive region. class G1ArchiveRegionMap : public G1BiasedMappedArray { protected: bool default_value() const { return false; }