< prev index next >
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
Print this page
rev 7471 : 8060025: Object copy time regressions after JDK-8031323 and JDK-8057536
Summary: Evaluate and improve object copy time by micro-optimizations and splitting out slow and fast paths aggressively.
Reviewed-by:
Contributed-by: Tony Printezis <tprintezis@twitter.com>, Thomas Schatzl <thomas.schatzl@oracle.com>
*** 1435,1456 ****
uint young_list_length = _g1->young_list()->length();
uint young_list_max_length = _young_list_max_length;
return young_list_length < young_list_max_length;
}
- uint G1CollectorPolicy::max_regions(int purpose) {
- switch (purpose) {
- case GCAllocForSurvived:
- return _max_survivor_regions;
- case GCAllocForTenured:
- return REGIONS_UNLIMITED;
- default:
- ShouldNotReachHere();
- return REGIONS_UNLIMITED;
- };
- }
-
void G1CollectorPolicy::update_max_gc_locker_expansion() {
uint expansion_region_num = 0;
if (GCLockerEdenExpansionPercent > 0) {
double perc = (double) GCLockerEdenExpansionPercent / 100.0;
double expansion_region_num_d = perc * (double) _young_list_target_length;
--- 1435,1444 ----
*** 1632,1642 ****
assert(!hr->in_collection_set(), "should not already be in the CSet");
hr->set_in_collection_set(true);
hr->set_next_in_collection_set(_collection_set);
_collection_set = hr;
_collection_set_bytes_used_before += hr->used();
! _g1->register_region_with_in_cset_fast_test(hr);
size_t rs_length = hr->rem_set()->occupied();
_recorded_rs_lengths += rs_length;
_old_cset_region_length += 1;
}
--- 1620,1630 ----
assert(!hr->in_collection_set(), "should not already be in the CSet");
hr->set_in_collection_set(true);
hr->set_next_in_collection_set(_collection_set);
_collection_set = hr;
_collection_set_bytes_used_before += hr->used();
! _g1->register_old_region_with_in_cset_fast_test(hr);
size_t rs_length = hr->rem_set()->occupied();
_recorded_rs_lengths += rs_length;
_old_cset_region_length += 1;
}
*** 1765,1775 ****
assert(!hr->in_collection_set(), "invariant");
hr->set_in_collection_set(true);
assert( hr->next_in_collection_set() == NULL, "invariant");
! _g1->register_region_with_in_cset_fast_test(hr);
}
// Add the region at the RHS of the incremental cset
void G1CollectorPolicy::add_region_to_incremental_cset_rhs(HeapRegion* hr) {
// We should only ever be appending survivors at the end of a pause
--- 1753,1763 ----
assert(!hr->in_collection_set(), "invariant");
hr->set_in_collection_set(true);
assert( hr->next_in_collection_set() == NULL, "invariant");
! _g1->register_young_region_with_in_cset_fast_test(hr);
}
// Add the region at the RHS of the incremental cset
void G1CollectorPolicy::add_region_to_incremental_cset_rhs(HeapRegion* hr) {
// We should only ever be appending survivors at the end of a pause
< prev index next >