< prev index next >
src/hotspot/share/gc/g1/g1CollectionSet.hpp
Print this page
rev 53416 : imported patch 8217330-split-collectionsetchooser
@@ -23,11 +23,11 @@
*/
#ifndef SHARE_GC_G1_G1COLLECTIONSET_HPP
#define SHARE_GC_G1_G1COLLECTIONSET_HPP
-#include "gc/g1/collectionSetChooser.hpp"
+#include "gc/g1/g1CollectionSetCandidates.hpp"
#include "utilities/debug.hpp"
#include "utilities/globalDefinitions.hpp"
class G1CollectedHeap;
class G1CollectorState;
@@ -39,11 +39,12 @@
class G1CollectionSet {
G1CollectedHeap* _g1h;
G1Policy* _policy;
- CollectionSetChooser* _cset_chooser;
+ // All old gen collection set candidate regions for the current mixed gc phase.
+ G1CollectionSetCandidates* _candidates;
uint _eden_region_length;
uint _survivor_region_length;
uint _old_region_length;
@@ -126,11 +127,19 @@
// Initializes the collection set giving the maximum possible length of the collection set.
void initialize(uint max_region_length);
void initialize_optional(uint max_length);
void free_optional_regions();
- CollectionSetChooser* cset_chooser();
+ void clear_candidates() {
+ delete _candidates;
+ _candidates = NULL;
+ }
+ void set_candidates(G1CollectionSetCandidates* candidates) {
+ assert(_candidates == NULL, "Trying to replace collection set candidates.");
+ _candidates = candidates;
+ }
+ G1CollectionSetCandidates* candidates() { return _candidates; }
void init_region_lengths(uint eden_cset_region_length,
uint survivor_cset_region_length);
void set_recorded_rs_lengths(size_t rs_lengths);
@@ -251,12 +260,12 @@
_pset(pset),
_current_index(0),
_current_limit(0),
_prepare_failed(false),
_evacuation_failed(false) { }
- // The destructor returns regions to the cset-chooser and
- // frees the optional structure in the cset.
+ // The destructor returns regions to the collection set candidates set and
+ // frees the optional structure in the collection set.
~G1OptionalCSet();
uint current_index() { return _current_index; }
uint current_limit() { return _current_limit; }
< prev index next >