hotspot/src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp
author jwilhelm
Wed, 03 Oct 2012 20:31:41 +0200
changeset 13925 37f75ba502b1
parent 7397 5b173b4ca846
child 15482 470d0b0c09f1
permissions -rw-r--r--
8000351: Tenuring threshold should be unsigned Summary: Change the flags and variables related to tenuring threshold to be unsigned Reviewed-by: jmasa, johnc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
     2
 * Copyright (c) 2004, 2010, 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: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
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: 1
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_SHARED_GCADAPTIVEPOLICYCOUNTERS_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_GCADAPTIVEPOLICYCOUNTERS_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
#ifndef SERIALGC
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "gc_implementation/shared/adaptiveSizePolicy.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "gc_implementation/shared/gcPolicyCounters.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
// This class keeps statistical information and computes the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
// size of the heap.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
class GCAdaptivePolicyCounters : public GCPolicyCounters {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  PerfVariable*         _eden_size_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  PerfVariable*         _promo_size_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  PerfVariable*         _young_capacity_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  PerfVariable*         _minor_gc_cost_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  PerfVariable*         _major_gc_cost_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  PerfVariable*         _mutator_cost_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  PerfVariable*         _avg_young_live_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  PerfVariable*         _avg_old_live_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  PerfVariable*         _avg_minor_pause_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  PerfVariable*         _avg_minor_interval_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
#ifdef NOT_PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  PerfVariable*         _minor_pause_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  PerfVariable*         _change_young_gen_for_min_pauses_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  PerfVariable*         _change_young_gen_for_throughput_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  PerfVariable*         _change_old_gen_for_maj_pauses_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  PerfVariable*         _change_old_gen_for_throughput_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  PerfVariable*         _decrease_for_footprint_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  PerfVariable*         _minor_pause_young_slope_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  PerfVariable*         _major_pause_old_slope_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  PerfVariable*         _decide_at_full_gc_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  PerfVariable*         _survived_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  PerfVariable*         _promoted_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  PerfVariable*         _avg_survived_avg_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  PerfVariable*         _avg_survived_dev_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  PerfVariable*         _avg_survived_padded_avg_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  PerfVariable*         _survivor_overflowed_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  PerfVariable*         _increment_tenuring_threshold_for_gc_cost_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  PerfVariable*         _decrement_tenuring_threshold_for_gc_cost_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  PerfVariable*        _decrement_tenuring_threshold_for_survivor_limit_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  PerfVariable*         _minor_collection_slope_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  PerfVariable*         _major_collection_slope_counter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  AdaptiveSizePolicy* _size_policy;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  inline void update_eden_size() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    size_t eden_size_in_bytes = size_policy()->calculated_eden_size_in_bytes();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
    _eden_size_counter->set_value(eden_size_in_bytes);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  inline void update_promo_size() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    _promo_size_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
      size_policy()->calculated_promo_size_in_bytes());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  inline void update_avg_minor_pause_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
    _avg_minor_pause_counter->set_value((jlong)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
      (size_policy()->avg_minor_pause()->average() * 1000.0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  inline void update_avg_minor_interval_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
    _avg_minor_interval_counter->set_value((jlong)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
      (size_policy()->avg_minor_interval()->average() * 1000.0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
#ifdef NOT_PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  inline void update_minor_pause_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    _minor_pause_counter->set_value((jlong)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
      (size_policy()->avg_minor_pause()->last_sample() * 1000.0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  inline void update_minor_gc_cost_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    _minor_gc_cost_counter->set_value((jlong)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
      (size_policy()->minor_gc_cost() * 100.0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  inline void update_avg_young_live_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    _avg_young_live_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
      (jlong)(size_policy()->avg_young_live()->average())
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
    );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  inline void update_avg_survived_avg_counters() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
    _avg_survived_avg_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
      (jlong)(size_policy()->_avg_survived->average())
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
    );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  inline void update_avg_survived_dev_counters() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
    _avg_survived_dev_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
      (jlong)(size_policy()->_avg_survived->deviation())
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
    );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  inline void update_avg_survived_padded_avg_counters() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
    _avg_survived_padded_avg_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
      (jlong)(size_policy()->_avg_survived->padded_average())
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
    );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  inline void update_change_old_gen_for_throughput() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    _change_old_gen_for_throughput_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
      size_policy()->change_old_gen_for_throughput());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  inline void update_change_young_gen_for_throughput() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
    _change_young_gen_for_throughput_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
      size_policy()->change_young_gen_for_throughput());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  inline void update_decrease_for_footprint() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
    _decrease_for_footprint_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
      size_policy()->decrease_for_footprint());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  inline void update_decide_at_full_gc_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
    _decide_at_full_gc_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
      size_policy()->decide_at_full_gc());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  inline void update_minor_pause_young_slope_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
    _minor_pause_young_slope_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
      (jlong)(size_policy()->minor_pause_young_slope() * 1000)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
    );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  virtual void update_counters_from_policy();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  virtual AdaptiveSizePolicy* size_policy() { return _size_policy; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  GCAdaptivePolicyCounters(const char* name,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
                           int collectors,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
                           int generations,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
                           AdaptiveSizePolicy* size_policy);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  inline void update_survived(size_t survived) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    _survived_counter->set_value(survived);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  inline void update_promoted(size_t promoted) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
    _promoted_counter->set_value(promoted);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  inline void update_young_capacity(size_t size_in_bytes) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
    _young_capacity_counter->set_value(size_in_bytes);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  virtual void update_counters();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  inline void update_survivor_size_counters() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
    desired_survivor_size()->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
      size_policy()->calculated_survivor_size_in_bytes());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  inline void update_survivor_overflowed(bool survivor_overflowed) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
    _survivor_overflowed_counter->set_value(survivor_overflowed);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  }
13925
37f75ba502b1 8000351: Tenuring threshold should be unsigned
jwilhelm
parents: 7397
diff changeset
   191
  inline void update_tenuring_threshold(uint threshold) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
    tenuring_threshold()->set_value(threshold);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
  inline void update_increment_tenuring_threshold_for_gc_cost() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
    _increment_tenuring_threshold_for_gc_cost_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
      size_policy()->increment_tenuring_threshold_for_gc_cost());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  inline void update_decrement_tenuring_threshold_for_gc_cost() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
    _decrement_tenuring_threshold_for_gc_cost_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
      size_policy()->decrement_tenuring_threshold_for_gc_cost());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  inline void update_decrement_tenuring_threshold_for_survivor_limit() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
    _decrement_tenuring_threshold_for_survivor_limit_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
      size_policy()->decrement_tenuring_threshold_for_survivor_limit());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  inline void update_change_young_gen_for_min_pauses() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
    _change_young_gen_for_min_pauses_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
      size_policy()->change_young_gen_for_min_pauses());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  inline void update_change_old_gen_for_maj_pauses() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
    _change_old_gen_for_maj_pauses_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
      size_policy()->change_old_gen_for_maj_pauses());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  inline void update_minor_collection_slope_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
    _minor_collection_slope_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
      (jlong)(size_policy()->minor_collection_slope() * 1000)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
    );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  inline void update_major_collection_slope_counter() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
    _major_collection_slope_counter->set_value(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
      (jlong)(size_policy()->major_collection_slope() * 1000)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
    );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  void set_size_policy(AdaptiveSizePolicy* v) { _size_policy = v; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
  virtual GCPolicyCounters::Name kind() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
    return GCPolicyCounters::GCAdaptivePolicyCountersKind;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   233
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   234
#endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_GCADAPTIVEPOLICYCOUNTERS_HPP