< prev index next >
src/share/vm/gc/parallel/psAdaptiveSizePolicy.hpp
Print this page
rev 8477 : [mq]: pretenured
*** 126,135 ****
--- 126,138 ----
// The number of bytes absorbed from eden into the old gen by moving the
// boundary over live data.
size_t _bytes_absorbed_from_eden;
+ // The number of bytes pretenured since last promotion.
+ size_t _total_pretenured_since_last_promotion;
+
private:
// Accessors
AdaptivePaddedAverage* avg_major_pause() const { return _avg_major_pause; }
double gc_minor_pause_goal_sec() const { return _gc_minor_pause_goal_sec; }
*** 238,249 ****
--- 241,265 ----
// called by GC algorithms. It is the responsibility of users of this
// policy to call these methods at the correct times!
void major_collection_begin();
void major_collection_end(size_t amount_live, GCCause::Cause gc_cause);
+ void reset_total_pretenured_since_last_promotion() {
+ _total_pretenured_since_last_promotion = 0;
+ }
+
+ size_t total_pretenured_since_last_promotion() const {
+ return _total_pretenured_since_last_promotion;
+ }
+
+ void add_pretenured_since_last_promotion(size_t size) {
+ _total_pretenured_since_last_promotion += size;
+ }
+
void tenured_allocation(size_t size) {
_avg_pretenured->sample(size);
+ add_pretenured_since_last_promotion(size);
}
// Accessors
// NEEDS_CLEANUP should use sizes.hpp
< prev index next >