< prev index next >
src/hotspot/share/gc/g1/heapRegion.hpp
Print this page
rev 56987 : [mq]: 8233588-kbarrett-review
@@ -36,10 +36,11 @@
#include "runtime/mutex.hpp"
#include "utilities/macros.hpp"
class G1CollectedHeap;
class G1CMBitMap;
+class G1Predictions;
class HeapRegionRemSet;
class HeapRegion;
class HeapRegionSetBase;
class nmethod;
@@ -542,54 +543,21 @@
assert(index != 0, "just checking");
assert(is_young(), "pre-condition");
_young_index_in_cset = index;
}
- int age_in_surv_rate_group() {
- assert(_surv_rate_group != NULL, "pre-condition");
- assert(_age_index > -1, "pre-condition");
- return _surv_rate_group->age_in_group(_age_index);
- }
-
- void record_surv_words_in_group(size_t words_survived) {
- assert(_surv_rate_group != NULL, "pre-condition");
- assert(_age_index > -1, "pre-condition");
- int age_in_group = age_in_surv_rate_group();
- _surv_rate_group->record_surviving_words(age_in_group, words_survived);
- }
-
- int age_in_surv_rate_group_cond() {
- if (_surv_rate_group != NULL)
- return age_in_surv_rate_group();
- else
- return -1;
- }
-
- SurvRateGroup* surv_rate_group() {
- return _surv_rate_group;
- }
+ int age_in_surv_rate_group() const;
+ bool has_valid_age_in_surv_rate() const;
- void install_surv_rate_group(SurvRateGroup* surv_rate_group) {
- assert(surv_rate_group != NULL, "pre-condition");
- assert(_surv_rate_group == NULL, "pre-condition");
- assert(is_young(), "pre-condition");
+ bool has_surv_rate_group() const;
- _surv_rate_group = surv_rate_group;
- _age_index = surv_rate_group->next_age_index();
- }
+ double surv_rate_prediction(G1Predictions const& predictor) const;
- void uninstall_surv_rate_group() {
- if (_surv_rate_group != NULL) {
- assert(_age_index > -1, "pre-condition");
- assert(is_young(), "pre-condition");
+ void install_surv_rate_group(SurvRateGroup* surv_rate_group);
+ void uninstall_surv_rate_group();
- _surv_rate_group = NULL;
- _age_index = -1;
- } else {
- assert(_age_index == -1, "pre-condition");
- }
- }
+ void record_surv_words_in_group(size_t words_survived);
// Determine if an object has been allocated since the last
// mark performed by the collector. This returns true iff the object
// is within the unmarked area of the region.
bool obj_allocated_since_prev_marking(oop obj) const {
< prev index next >