hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp
author jwilhelm
Thu, 23 Jan 2014 14:47:23 +0100
changeset 22551 9bf46d16dcc6
parent 17842 0d11fa49f81f
permissions -rw-r--r--
8025856: Fix typos in the GC code Summary: Fix about 440 typos in comments in the VM code Reviewed-by: mgerdin, tschatzl, coleenp, kmo, jcoomes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
17842
0d11fa49f81f 8007762: Rename a bunch of methods in size policy across collectors
tamao
parents: 13925
diff changeset
     2
 * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 2131
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 2131
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 2131
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSADAPTIVESIZEPOLICY_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSADAPTIVESIZEPOLICY_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "gc_implementation/shared/adaptiveSizePolicy.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "runtime/timer.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
// This class keeps statistical information and computes the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
// size of the heap for the concurrent mark sweep collector.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
// Cost for garbage collector include cost for
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
//   minor collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
//   concurrent collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
//      stop-the-world component
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
//      concurrent component
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
//   major compacting collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
//      uses decaying cost
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
// Forward decls
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
class elapsedTimer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
class CMSAdaptiveSizePolicy : public AdaptiveSizePolicy {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
 friend class CMSGCAdaptivePolicyCounters;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
 friend class CMSCollector;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  // Total number of processors available
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  int _processor_count;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  // Number of processors used by the concurrent phases of GC
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  // This number is assumed to be the same for all concurrent
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  // phases.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  int _concurrent_processor_count;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  // Time that the mutators run exclusive of a particular
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  // phase.  For example, the time the mutators run excluding
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  // the time during which the cms collector runs concurrently
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  // with the mutators.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  //   Between end of most recent cms reset and start of initial mark
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
                // This may be redundant
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  double _latest_cms_reset_end_to_initial_mark_start_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  //   Between end of the most recent initial mark and start of remark
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  double _latest_cms_initial_mark_end_to_remark_start_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  //   Between end of most recent collection and start of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  //   a concurrent collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  double _latest_cms_collection_end_to_collection_start_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  //   Times of the concurrent phases of the most recent
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  //   concurrent collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  double _latest_cms_concurrent_marking_time_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  double _latest_cms_concurrent_precleaning_time_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  double _latest_cms_concurrent_sweeping_time_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  //   Between end of most recent STW MSC and start of next STW MSC
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  double _latest_cms_msc_end_to_msc_start_time_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  //   Between end of most recent MS and start of next MS
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  //   This does not include any time spent during a concurrent
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  // collection.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  double _latest_cms_ms_end_to_ms_start;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  //   Between start and end of the initial mark of the most recent
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  // concurrent collection.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  double _latest_cms_initial_mark_start_to_end_time_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  //   Between start and end of the remark phase of the most recent
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  // concurrent collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  double _latest_cms_remark_start_to_end_time_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  //   Between start and end of the most recent MS STW marking phase
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  double _latest_cms_ms_marking_start_to_end_time_secs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  // Pause time timers
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  static elapsedTimer _STW_timer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  // Concurrent collection timer.  Used for total of all concurrent phases
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  // during 1 collection cycle.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  static elapsedTimer _concurrent_timer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  // When the size of the generation is changed, the size
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  // of the change will rounded up or down (depending on the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  // type of change) by this value.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  size_t _generation_alignment;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  // If this variable is true, the size of the young generation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  // may be changed in order to reduce the pause(s) of the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  // collection of the tenured generation in order to meet the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  // pause time goal.  It is common to change the size of the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  // tenured generation in order to meet the pause time goal
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  // for the tenured generation.  With the CMS collector for
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  // the tenured generation, the size of the young generation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  // can have an significant affect on the pause times for collecting the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  // tenured generation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  // This is a duplicate of a variable in PSAdaptiveSizePolicy.  It
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  // is duplicated because it is not clear that it is general enough
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  // to go into AdaptiveSizePolicy.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  int _change_young_gen_for_maj_pauses;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  // Variable that is set to true after a collection.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  bool _first_after_collection;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  // Fraction of collections that are of each type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  double concurrent_fraction() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  double STW_msc_fraction() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  double STW_ms_fraction() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  // This call cannot be put into the epilogue as long as some
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  // of the counters can be set during concurrent phases.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  virtual void clear_generation_free_space_flags();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  void set_first_after_collection() { _first_after_collection = true; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  // Average of the sum of the concurrent times for
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  // one collection in seconds.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  AdaptiveWeightedAverage* _avg_concurrent_time;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  // Average time between concurrent collections in seconds.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  AdaptiveWeightedAverage* _avg_concurrent_interval;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  // Average cost of the concurrent part of a collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  // in seconds.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  AdaptiveWeightedAverage* _avg_concurrent_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  // Average of the initial pause of a concurrent collection in seconds.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  AdaptivePaddedAverage* _avg_initial_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  // Average of the remark pause of a concurrent collection in seconds.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  AdaptivePaddedAverage* _avg_remark_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  // Average of the stop-the-world (STW) (initial mark + remark)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  // times in seconds for concurrent collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  AdaptiveWeightedAverage* _avg_cms_STW_time;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  // Average of the STW collection cost for concurrent collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  AdaptiveWeightedAverage* _avg_cms_STW_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  // Average of the bytes free at the start of the sweep.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  AdaptiveWeightedAverage* _avg_cms_free_at_sweep;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  // Average of the bytes free at the end of the collection.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  AdaptiveWeightedAverage* _avg_cms_free;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  // Average of the bytes promoted between cms collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  AdaptiveWeightedAverage* _avg_cms_promo;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  // stop-the-world (STW) mark-sweep-compact
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  // Average of the pause time in seconds for STW mark-sweep-compact
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  // collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  AdaptiveWeightedAverage* _avg_msc_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  // Average of the interval in seconds between STW mark-sweep-compact
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  // collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  AdaptiveWeightedAverage* _avg_msc_interval;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  // Average of the collection costs for STW mark-sweep-compact
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  // collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  AdaptiveWeightedAverage* _avg_msc_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  // Averages for mark-sweep collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  // The collection may have started as a background collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  // that completes in a stop-the-world (STW) collection.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  // Average of the pause time in seconds for mark-sweep
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  // collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  AdaptiveWeightedAverage* _avg_ms_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  // Average of the interval in seconds between mark-sweep
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  // collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  AdaptiveWeightedAverage* _avg_ms_interval;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
  // Average of the collection costs for mark-sweep
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  // collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  AdaptiveWeightedAverage* _avg_ms_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  // These variables contain a linear fit of
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  // a generation size as the independent variable
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  // and a pause time as the dependent variable.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  // For example _remark_pause_old_estimator
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  // is a fit of the old generation size as the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  // independent variable and the remark pause
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  // as the dependent variable.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  //   remark pause time vs. cms gen size
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  LinearLeastSquareFit* _remark_pause_old_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  //   initial pause time vs. cms gen size
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  LinearLeastSquareFit* _initial_pause_old_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  //   remark pause time vs. young gen size
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  LinearLeastSquareFit* _remark_pause_young_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  //   initial pause time vs. young gen size
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
  LinearLeastSquareFit* _initial_pause_young_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  // Accessors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  int processor_count() const { return _processor_count; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  int concurrent_processor_count() const { return _concurrent_processor_count; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  AdaptiveWeightedAverage* avg_concurrent_time() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
    return _avg_concurrent_time;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
  AdaptiveWeightedAverage* avg_concurrent_interval() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
    return _avg_concurrent_interval;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  AdaptiveWeightedAverage* avg_concurrent_gc_cost() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
    return _avg_concurrent_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  AdaptiveWeightedAverage* avg_cms_STW_time() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
    return _avg_cms_STW_time;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  AdaptiveWeightedAverage* avg_cms_STW_gc_cost() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
    return _avg_cms_STW_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  AdaptivePaddedAverage* avg_initial_pause() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
    return _avg_initial_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  AdaptivePaddedAverage* avg_remark_pause() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
    return _avg_remark_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  AdaptiveWeightedAverage* avg_cms_free() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
    return _avg_cms_free;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
  AdaptiveWeightedAverage* avg_cms_free_at_sweep() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
    return _avg_cms_free_at_sweep;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  AdaptiveWeightedAverage* avg_msc_pause() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
    return _avg_msc_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  AdaptiveWeightedAverage* avg_msc_interval() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
    return _avg_msc_interval;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
  AdaptiveWeightedAverage* avg_msc_gc_cost() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
    return _avg_msc_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
  AdaptiveWeightedAverage* avg_ms_pause() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
    return _avg_ms_pause;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
  AdaptiveWeightedAverage* avg_ms_interval() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
    return _avg_ms_interval;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
  AdaptiveWeightedAverage* avg_ms_gc_cost() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
    return _avg_ms_gc_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
  LinearLeastSquareFit* remark_pause_old_estimator() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
    return _remark_pause_old_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  LinearLeastSquareFit* initial_pause_old_estimator() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
    return _initial_pause_old_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
  LinearLeastSquareFit* remark_pause_young_estimator() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
    return _remark_pause_young_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
  LinearLeastSquareFit* initial_pause_young_estimator() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
    return _initial_pause_young_estimator;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
  // These *slope() methods return the slope
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
  // m for the linear fit of an independent
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
  // variable vs. a dependent variable.  For
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
  // example
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
  //  remark_pause = m * old_generation_size + c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
  // These may be used to determine if an
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
  // adjustment should be made to achieve a goal.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
  // For example, if remark_pause_old_slope() is
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
  // positive, a reduction of the old generation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
  // size has on average resulted in the reduction
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
  // of the remark pause.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
  float remark_pause_old_slope() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
    return _remark_pause_old_estimator->slope();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
  float initial_pause_old_slope() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
    return _initial_pause_old_estimator->slope();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
  float remark_pause_young_slope() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
    return _remark_pause_young_estimator->slope();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
  float initial_pause_young_slope() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
    return _initial_pause_young_estimator->slope();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
  // Update estimators
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
  void update_minor_pause_old_estimator(double minor_pause_in_ms);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
  // Fraction of processors used by the concurrent phases.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
  double concurrent_processor_fraction();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
  // Returns the total times for the concurrent part of the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
  // latest collection in seconds.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
  double concurrent_collection_time();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
  // Return the total times for the concurrent part of the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
  // latest collection in seconds where the times of the various
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
  // concurrent phases are scaled by the processor fraction used
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
  // during the phase.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
  double scaled_concurrent_collection_time();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
  // Dimensionless concurrent GC cost for all the concurrent phases.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
  double concurrent_collection_cost(double interval_in_seconds);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
  // Dimensionless GC cost
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
  double collection_cost(double pause_in_seconds, double interval_in_seconds);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
  virtual GCPolicyKind kind() const { return _gc_cms_adaptive_size_policy; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
  virtual double time_since_major_gc() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
  // This returns the maximum average for the concurrent, ms, and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
  // msc collections.  This is meant to be used for the calculation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
  // of the decayed major gc cost and is not in general the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
  // average of all the different types of major collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
  virtual double major_gc_interval_average_for_decay() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
  CMSAdaptiveSizePolicy(size_t init_eden_size,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
                        size_t init_promo_size,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
                        size_t init_survivor_size,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
                        double max_gc_minor_pause_sec,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
                        double max_gc_pause_sec,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
                        uint gc_cost_ratio);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
  // The timers for the stop-the-world phases measure a total
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
  // stop-the-world time.  The timer is started and stopped
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  // for each phase but is only reset after the final checkpoint.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
  void checkpoint_roots_initial_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
  void checkpoint_roots_initial_end(GCCause::Cause gc_cause);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
  void checkpoint_roots_final_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
  void checkpoint_roots_final_end(GCCause::Cause gc_cause);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
  // Methods for gathering information about the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
  // concurrent marking phase of the collection.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
  // Records the mutator times and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
  // resets the concurrent timer.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
  void concurrent_marking_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
  // Resets concurrent phase timer in the begin methods and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
  // saves the time for a phase in the end methods.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
  void concurrent_marking_end();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
  void concurrent_sweeping_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
  void concurrent_sweeping_end();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
  // Similar to the above (e.g., concurrent_marking_end()) and
22551
9bf46d16dcc6 8025856: Fix typos in the GC code
jwilhelm
parents: 17842
diff changeset
   359
  // is used for both the precleaning an abortable precleaning
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
  // phases.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
  void concurrent_precleaning_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
  void concurrent_precleaning_end();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
  // Stops the concurrent phases time.  Gathers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
  // information and resets the timer.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
  void concurrent_phases_end(GCCause::Cause gc_cause,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
                              size_t cur_eden,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
                              size_t cur_promo);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
  // Methods for gather information about STW Mark-Sweep-Compact
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
  void msc_collection_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
  void msc_collection_end(GCCause::Cause gc_cause);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
  // Methods for gather information about Mark-Sweep done
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
  // in the foreground.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
  void ms_collection_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
  void ms_collection_end(GCCause::Cause gc_cause);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
  // Cost for a mark-sweep tenured gen collection done in the foreground
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
  double ms_gc_cost() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
    return MAX2(0.0F, _avg_ms_gc_cost->average());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
  // Cost of collecting the tenured generation.  Includes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
  // concurrent collection and STW collection costs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
  double cms_gc_cost() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
  // Cost of STW mark-sweep-compact tenured gen collection.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
  double msc_gc_cost() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
    return MAX2(0.0F, _avg_msc_gc_cost->average());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
  double compacting_gc_cost() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
    double result = MIN2(1.0, minor_gc_cost() + msc_gc_cost());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
    assert(result >= 0.0, "Both minor and major costs are non-negative");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
    return result;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
   // Restarts the concurrent phases timer.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
   void concurrent_phases_resume();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
2131
98f9cef66a34 6810672: Comment typos
twisti
parents: 1
diff changeset
   402
   // Time beginning and end of the marking phase for
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
   // a synchronous MS collection.  A MS collection
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
   // that finishes in the foreground can have started
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
   // in the background.  These methods capture the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
   // completion of the marking (after the initial
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
   // marking) that is done in the foreground.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
   void ms_collection_marking_begin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
   void ms_collection_marking_end(GCCause::Cause gc_cause);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
   static elapsedTimer* concurrent_timer_ptr() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
     return &_concurrent_timer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
  AdaptiveWeightedAverage* avg_cms_promo() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
    return _avg_cms_promo;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
  int change_young_gen_for_maj_pauses() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
    return _change_young_gen_for_maj_pauses;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
  void set_change_young_gen_for_maj_pauses(int v) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
    _change_young_gen_for_maj_pauses = v;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
  void clear_internal_time_intervals();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
  // Either calculated_promo_size_in_bytes() or promo_size()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
  // should be deleted.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
  size_t promo_size() { return _promo_size; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
  void set_promo_size(size_t v) { _promo_size = v; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
  // Cost of GC for all types of collections.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
  virtual double gc_cost() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
  size_t generation_alignment() { return _generation_alignment; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
17842
0d11fa49f81f 8007762: Rename a bunch of methods in size policy across collectors
tamao
parents: 13925
diff changeset
   439
  virtual void compute_eden_space_size(size_t cur_eden,
0d11fa49f81f 8007762: Rename a bunch of methods in size policy across collectors
tamao
parents: 13925
diff changeset
   440
                                       size_t max_eden_size);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
  // Calculates new survivor space size;  returns a new tenuring threshold
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
  // value. Stores new survivor size in _survivor_size.
13925
37f75ba502b1 8000351: Tenuring threshold should be unsigned
jwilhelm
parents: 7397
diff changeset
   443
  virtual uint compute_survivor_space_size_and_threshold(
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
                                                bool   is_survivor_overflow,
13925
37f75ba502b1 8000351: Tenuring threshold should be unsigned
jwilhelm
parents: 7397
diff changeset
   445
                                                uint   tenuring_threshold,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
                                                size_t survivor_limit);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
  virtual void compute_tenured_generation_free_space(size_t cur_tenured_free,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
                                           size_t max_tenured_available,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
                                           size_t cur_eden);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
  size_t eden_decrement_aligned_down(size_t cur_eden);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
  size_t eden_increment_aligned_up(size_t cur_eden);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
  size_t adjust_eden_for_pause_time(size_t cur_eden);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
  size_t adjust_eden_for_throughput(size_t cur_eden);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
  size_t adjust_eden_for_footprint(size_t cur_eden);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
  size_t promo_decrement_aligned_down(size_t cur_promo);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
  size_t promo_increment_aligned_up(size_t cur_promo);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
  size_t adjust_promo_for_pause_time(size_t cur_promo);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
  size_t adjust_promo_for_throughput(size_t cur_promo);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
  size_t adjust_promo_for_footprint(size_t cur_promo, size_t cur_eden);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
  // Scale down the input size by the ratio of the cost to collect the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
  // generation to the total GC cost.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
  size_t scale_by_gen_gc_cost(size_t base_change, double gen_gc_cost);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
  // Return the value and clear it.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
  bool get_and_clear_first_after_collection();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
  // Printing support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
  virtual bool print_adaptive_size_policy_on(outputStream* st) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   476
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   477
#endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSADAPTIVESIZEPOLICY_HPP