8217328: Rename CollectionSetChooser to G1CollectionSetChooser
Reviewed-by: lkorinth, kbarrett
This commit is contained in:
parent
13256c7908
commit
999ecc66a4
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/g1/collectionSetChooser.hpp"
|
||||
#include "gc/g1/g1CollectionSetCandidates.hpp"
|
||||
#include "gc/g1/g1CollectionSetChooser.hpp"
|
||||
#include "gc/g1/heapRegion.inline.hpp"
|
||||
|
||||
HeapRegion* G1CollectionSetCandidates::pop_front() {
|
||||
@ -73,7 +73,7 @@ void G1CollectionSetCandidates::verify() const {
|
||||
for (; idx < _num_regions; idx++) {
|
||||
HeapRegion *cur = _regions[idx];
|
||||
guarantee(cur != NULL, "Regions after _front_idx %u cannot be NULL but %u is", _front_idx, idx);
|
||||
guarantee(CollectionSetChooser::should_add(cur), "Region %u should be eligible for addition.", cur->hrm_index());
|
||||
guarantee(G1CollectionSetChooser::should_add(cur), "Region %u should be eligible for addition.", cur->hrm_index());
|
||||
if (prev != NULL) {
|
||||
guarantee(prev->gc_efficiency() >= cur->gc_efficiency(),
|
||||
"GC efficiency for region %u: %1.4f smaller than for region %u: %1.4f",
|
||||
|
@ -23,9 +23,9 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/g1/collectionSetChooser.hpp"
|
||||
#include "gc/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc/g1/g1CollectionSetCandidates.hpp"
|
||||
#include "gc/g1/g1CollectionSetChooser.hpp"
|
||||
#include "gc/g1/heapRegionRemSet.hpp"
|
||||
#include "gc/shared/space.inline.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
@ -171,7 +171,7 @@ class G1BuildCandidateRegionsTask : public AbstractGangTask {
|
||||
_reclaimable_bytes_added += hr->reclaimable_bytes();
|
||||
}
|
||||
|
||||
bool should_add(HeapRegion* hr) { return CollectionSetChooser::should_add(hr); }
|
||||
bool should_add(HeapRegion* hr) { return G1CollectionSetChooser::should_add(hr); }
|
||||
|
||||
public:
|
||||
G1BuildCandidateRegionsClosure(G1BuildCandidateArray* array) :
|
||||
@ -245,19 +245,19 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
uint CollectionSetChooser::calculate_work_chunk_size(uint num_workers, uint num_regions) {
|
||||
uint G1CollectionSetChooser::calculate_work_chunk_size(uint num_workers, uint num_regions) {
|
||||
assert(num_workers > 0, "Active gc workers should be greater than 0");
|
||||
return MAX2(num_regions / num_workers, 1U);
|
||||
}
|
||||
|
||||
bool CollectionSetChooser::should_add(HeapRegion* hr) {
|
||||
bool G1CollectionSetChooser::should_add(HeapRegion* hr) {
|
||||
return !hr->is_young() &&
|
||||
!hr->is_pinned() &&
|
||||
region_occupancy_low_enough_for_evac(hr->live_bytes()) &&
|
||||
hr->rem_set()->is_complete();
|
||||
}
|
||||
|
||||
G1CollectionSetCandidates* CollectionSetChooser::build(WorkGang* workers, uint max_num_regions) {
|
||||
G1CollectionSetCandidates* G1CollectionSetChooser::build(WorkGang* workers, uint max_num_regions) {
|
||||
uint num_workers = workers->active_workers();
|
||||
uint chunk_size = calculate_work_chunk_size(num_workers, max_num_regions);
|
||||
|
@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SHARE_GC_G1_COLLECTIONSETCHOOSER_HPP
|
||||
#define SHARE_GC_G1_COLLECTIONSETCHOOSER_HPP
|
||||
#ifndef SHARE_GC_G1_G1COLLECTIONSETCHOOSER_HPP
|
||||
#define SHARE_GC_G1_G1COLLECTIONSETCHOOSER_HPP
|
||||
|
||||
#include "gc/g1/heapRegion.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
@ -34,7 +34,7 @@ class WorkGang;
|
||||
|
||||
// Helper class to calculate collection set candidates, and containing some related
|
||||
// methods.
|
||||
class CollectionSetChooser : public AllStatic {
|
||||
class G1CollectionSetChooser : public AllStatic {
|
||||
static uint calculate_work_chunk_size(uint num_workers, uint num_regions);
|
||||
public:
|
||||
|
||||
@ -57,4 +57,4 @@ public:
|
||||
static G1CollectionSetCandidates* build(WorkGang* workers, uint max_num_regions);
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_G1_COLLECTIONSETCHOOSER_HPP
|
||||
#endif // SHARE_GC_G1_G1COLLECTIONSETCHOOSER_HPP
|
@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/g1/collectionSetChooser.hpp"
|
||||
#include "gc/g1/g1Analytics.hpp"
|
||||
#include "gc/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc/g1/g1CollectionSet.hpp"
|
||||
@ -31,6 +30,7 @@
|
||||
#include "gc/g1/g1ConcurrentMark.hpp"
|
||||
#include "gc/g1/g1ConcurrentMarkThread.inline.hpp"
|
||||
#include "gc/g1/g1ConcurrentRefine.hpp"
|
||||
#include "gc/g1/g1CollectionSetChooser.hpp"
|
||||
#include "gc/g1/g1HeterogeneousHeapPolicy.hpp"
|
||||
#include "gc/g1/g1HotCardCache.hpp"
|
||||
#include "gc/g1/g1IHOPControl.hpp"
|
||||
@ -1028,7 +1028,7 @@ void G1Policy::decide_on_conc_mark_initiation() {
|
||||
}
|
||||
|
||||
void G1Policy::record_concurrent_mark_cleanup_end() {
|
||||
G1CollectionSetCandidates* candidates = CollectionSetChooser::build(_g1h->workers(), _g1h->num_regions());
|
||||
G1CollectionSetCandidates* candidates = G1CollectionSetChooser::build(_g1h->workers(), _g1h->num_regions());
|
||||
_collection_set->set_candidates(candidates);
|
||||
|
||||
bool mixed_gc_pending = next_gc_should_be_mixed("request mixed gcs", "request young-only gcs");
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
class HeapRegion;
|
||||
class G1CollectionSet;
|
||||
class CollectionSetChooser;
|
||||
class G1CollectionSetChooser;
|
||||
class G1IHOPControl;
|
||||
class G1Analytics;
|
||||
class G1SurvivorRegions;
|
||||
@ -176,7 +176,7 @@ private:
|
||||
double non_young_other_time_ms() const;
|
||||
double constant_other_time_ms(double pause_time_ms) const;
|
||||
|
||||
CollectionSetChooser* cset_chooser() const;
|
||||
G1CollectionSetChooser* cset_chooser() const;
|
||||
|
||||
// The number of bytes copied during the GC.
|
||||
size_t _bytes_copied_during_gc;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/g1/collectionSetChooser.hpp"
|
||||
#include "gc/g1/g1CollectionSetChooser.hpp"
|
||||
#include "gc/g1/g1RemSetTrackingPolicy.hpp"
|
||||
#include "gc/g1/heapRegion.inline.hpp"
|
||||
#include "gc/g1/heapRegionRemSet.hpp"
|
||||
@ -126,7 +126,7 @@ bool G1RemSetTrackingPolicy::update_before_rebuild(HeapRegion* r, size_t live_by
|
||||
// - Otherwise only add those old gen regions which occupancy is low enough that there
|
||||
// is a chance that we will ever evacuate them in the mixed gcs.
|
||||
if ((total_live_bytes > 0) &&
|
||||
CollectionSetChooser::region_occupancy_low_enough_for_evac(total_live_bytes) &&
|
||||
G1CollectionSetChooser::region_occupancy_low_enough_for_evac(total_live_bytes) &&
|
||||
!r->rem_set()->is_tracked()) {
|
||||
|
||||
r->rem_set()->set_state_updating();
|
||||
|
Loading…
x
Reference in New Issue
Block a user