Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ void G1CSetCandidateGroup::calculate_efficiency() {
}

double G1CSetCandidateGroup::liveness_percent() const {
if (length() == 0) {
return 0.0f;
}
size_t capacity = length() * G1HeapRegion::GrainBytes;
return ((capacity - _reclaimable_bytes) * 100.0) / capacity;
}
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3162,7 +3162,9 @@ void G1PrintRegionLivenessInfoClosure::log_cset_candidate_groups() {

G1CollectedHeap* g1h = G1CollectedHeap::heap();

log_cset_candidate_group_add_total(g1h->young_regions_cset_group(), "Y");
if (g1h->young_regions_cset_group()->length() != 0) {
log_cset_candidate_group_add_total(g1h->young_regions_cset_group(), "Y");
}

G1CollectionSetCandidates* candidates = g1h->policy()->candidates();
log_cset_candidate_grouplist(candidates->from_marking_groups(), "M");
Expand Down