Skip to content

Commit ed260e8

Browse files
author
Thomas Schatzl
committed
8365026: G1: Initialization should start a "full" new collection set
Reviewed-by: ayang, kbarrett
1 parent f0e7066 commit ed260e8

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,8 @@ jint G1CollectedHeap::initialize() {
14871487

14881488
_collection_set.initialize(max_num_regions());
14891489

1490+
start_new_collection_set();
1491+
14901492
allocation_failure_injector()->reset();
14911493

14921494
CPUTimeCounters::create_counter(CPUTimeGroups::CPUTimeType::gc_parallel_workers);

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,8 @@ class VerifyNoCSetOops {
19621962
};
19631963

19641964
void G1ConcurrentMark::verify_no_collection_set_oops() {
1965-
assert(SafepointSynchronize::is_at_safepoint(), "should be at a safepoint");
1965+
assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),
1966+
"should be at a safepoint or initializing");
19661967
if (!_g1h->collector_state()->mark_or_rebuild_in_progress()) {
19671968
return;
19681969
}

src/hotspot/share/gc/g1/g1Policy.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ void G1Policy::init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) {
9797
_free_regions_at_end_of_collection = _g1h->num_free_regions();
9898

9999
update_young_length_bounds();
100-
101-
// We immediately start allocating regions placing them in the collection set.
102-
// Initialize the collection set info.
103-
_collection_set->start_incremental_building();
104100
}
105101

106102
void G1Policy::record_young_gc_pause_start() {

0 commit comments

Comments
 (0)