mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8365939: [Redo] G1: Move collection set related full gc reset code into abandon_collection_set() method
Reviewed-by: ayang, iwalulya
This commit is contained in:
parent
d06c66f7f5
commit
7469a274bb
@ -2803,6 +2803,8 @@ void G1CollectedHeap::abandon_collection_set() {
|
||||
collection_set()->stop_incremental_building();
|
||||
|
||||
collection_set()->abandon_all_candidates();
|
||||
|
||||
young_regions_cset_group()->clear(true /* uninstall_group_cardset */);
|
||||
}
|
||||
|
||||
bool G1CollectedHeap::is_old_gc_alloc_region(G1HeapRegion* hr) {
|
||||
|
||||
@ -244,11 +244,6 @@ void G1FullCollector::complete_collection(size_t allocation_word_size) {
|
||||
|
||||
_heap->resize_all_tlabs();
|
||||
|
||||
// We clear remembered sets for young regions this late in the full GC because
|
||||
// G1HeapVerifier expects the remembered sets for all young regions to be complete
|
||||
// throughout most of the collection process (e.g. G1FullCollector::verify_after_marking).
|
||||
_heap->young_regions_cset_group()->clear();
|
||||
|
||||
_heap->policy()->record_full_collection_end();
|
||||
_heap->gc_epilogue(true);
|
||||
|
||||
|
||||
@ -235,6 +235,8 @@ private:
|
||||
VerifyOption _vo;
|
||||
bool _failures;
|
||||
|
||||
bool is_in_full_gc() const { return G1CollectedHeap::heap()->collector_state()->in_full_gc(); }
|
||||
|
||||
public:
|
||||
VerifyRegionClosure(VerifyOption vo)
|
||||
: _vo(vo),
|
||||
@ -246,7 +248,7 @@ public:
|
||||
|
||||
bool do_heap_region(G1HeapRegion* r) {
|
||||
guarantee(!r->has_index_in_opt_cset(), "Region %u still has opt collection set index %u", r->hrm_index(), r->index_in_opt_cset());
|
||||
guarantee(!r->is_young() || r->rem_set()->is_complete(), "Remembered set for Young region %u must be complete, is %s", r->hrm_index(), r->rem_set()->get_state_str());
|
||||
guarantee(is_in_full_gc() || !r->is_young() || r->rem_set()->is_complete(), "Remembered set for Young region %u must be complete outside full gc, is %s", r->hrm_index(), r->rem_set()->get_state_str());
|
||||
// Humongous and old regions regions might be of any state, so can't check here.
|
||||
guarantee(!r->is_free() || !r->rem_set()->is_tracked(), "Remembered set for free region %u must be untracked, is %s", r->hrm_index(), r->rem_set()->get_state_str());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user