--- old/src/hotspot/share/gc/g1/g1CollectorState.hpp 2018-03-28 16:02:59.404893738 +0200 +++ new/src/hotspot/share/gc/g1/g1CollectorState.hpp 2018-03-28 16:02:59.128885226 +0200 @@ -64,6 +64,10 @@ // of the initial mark pause to the end of the Cleanup pause. bool _mark_or_rebuild_in_progress; + // The next bitmap is currently being cleared or about to be cleared. TAMS and bitmap + // may be out of sync. + bool _clearing_next_bitmap; + // Set during a full gc pause. bool _in_full_gc; @@ -76,6 +80,7 @@ _initiate_conc_mark_if_possible(false), _mark_or_rebuild_in_progress(false), + _clearing_next_bitmap(false), _in_full_gc(false) { } // Phase setters @@ -89,6 +94,7 @@ void set_initiate_conc_mark_if_possible(bool v) { _initiate_conc_mark_if_possible = v; } void set_mark_or_rebuild_in_progress(bool v) { _mark_or_rebuild_in_progress = v; } + void set_clearing_next_bitmap(bool v) { _clearing_next_bitmap = v; } // Phase getters bool in_young_only_phase() const { return _in_young_only_phase && !_in_full_gc; } @@ -102,6 +108,7 @@ bool initiate_conc_mark_if_possible() const { return _initiate_conc_mark_if_possible; } bool mark_or_rebuild_in_progress() const { return _mark_or_rebuild_in_progress; } + bool clearing_next_bitmap() const { return _clearing_next_bitmap; } G1YCType yc_type() const { if (in_initial_mark_gc()) {