--- old/src/hotspot/share/gc/g1/heapRegionType.hpp 2018-10-05 11:11:07.555645800 -0700 +++ new/src/hotspot/share/gc/g1/heapRegionType.hpp 2018-10-05 11:11:06.653946600 -0700 @@ -74,8 +74,9 @@ ContinuesHumongousTag = HumongousMask | PinnedMask + 1, OldMask = 16, + PreMatureOldMask = OldMask + 1, OldTag = OldMask, - + PreMatureOldTag = PreMatureOldMask, // Archive regions are regions with immutable content (i.e. not reclaimed, and // not allocated into during regular operation). They differ in the kind of references // allowed for the contained objects: @@ -137,6 +138,8 @@ // is_old regions may or may not also be pinned bool is_old() const { return (get() & OldMask) != 0; } + bool is_premature_old() const { return get() == PreMatureOldTag; } + bool is_old_or_humongous() const { return (get() & (OldMask | HumongousMask)) != 0; } bool is_old_or_humongous_or_archive() const { return (get() & (OldMask | HumongousMask | ArchiveMask)) != 0; } @@ -157,6 +160,8 @@ void set_old() { set(OldTag); } + void set_premature_old() { set(PreMatureOldTag); } + // Change the current region type to be of an old region type if not already done so. // Returns whether the region type has been changed or not. bool relabel_as_old() {