annotate src/share/vm/gc_implementation/concurrentMarkSweep/cmsGCAdaptivePolicyCounters.cpp @ 6862:8a5ea0a9ccc4

7127708: G1: change task num types from int to uint in concurrent mark Summary: Change the type of various task num fields, parameters etc to unsigned and rename them to be more consistent with the other collectors. Code changes were also reviewed by Vitaly Davidovich. Reviewed-by: johnc Contributed-by: Kaushik Srenevasan <kaushik@twitter.com>
author johnc
date Sat, 06 Oct 2012 01:17:44 -0700
parents f95d63e2154a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
2 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #include "precompiled.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #include "gc_implementation/concurrentMarkSweep/cmsGCAdaptivePolicyCounters.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #include "memory/resourceArea.hpp"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 CMSGCAdaptivePolicyCounters::CMSGCAdaptivePolicyCounters(const char* name_arg,
a61af66fc99e Initial load
duke
parents:
diff changeset
30 int collectors,
a61af66fc99e Initial load
duke
parents:
diff changeset
31 int generations,
a61af66fc99e Initial load
duke
parents:
diff changeset
32 AdaptiveSizePolicy* size_policy_arg)
a61af66fc99e Initial load
duke
parents:
diff changeset
33 : GCAdaptivePolicyCounters(name_arg,
a61af66fc99e Initial load
duke
parents:
diff changeset
34 collectors,
a61af66fc99e Initial load
duke
parents:
diff changeset
35 generations,
a61af66fc99e Initial load
duke
parents:
diff changeset
36 size_policy_arg) {
a61af66fc99e Initial load
duke
parents:
diff changeset
37 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
38 EXCEPTION_MARK;
a61af66fc99e Initial load
duke
parents:
diff changeset
39 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 const char* cname =
a61af66fc99e Initial load
duke
parents:
diff changeset
42 PerfDataManager::counter_name(name_space(), "cmsCapacity");
a61af66fc99e Initial load
duke
parents:
diff changeset
43 _cms_capacity_counter = PerfDataManager::create_variable(SUN_GC, cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
44 PerfData::U_Bytes, (jlong) OldSize, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
45 #ifdef NOT_PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
46 cname =
a61af66fc99e Initial load
duke
parents:
diff changeset
47 PerfDataManager::counter_name(name_space(), "initialPause");
a61af66fc99e Initial load
duke
parents:
diff changeset
48 _initial_pause_counter = PerfDataManager::create_variable(SUN_GC, cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
49 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
50 (jlong) cms_size_policy()->avg_initial_pause()->last_sample(),
a61af66fc99e Initial load
duke
parents:
diff changeset
51 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 cname = PerfDataManager::counter_name(name_space(), "remarkPause");
a61af66fc99e Initial load
duke
parents:
diff changeset
54 _remark_pause_counter = PerfDataManager::create_variable(SUN_GC, cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
55 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
56 (jlong) cms_size_policy()->avg_remark_pause()->last_sample(),
a61af66fc99e Initial load
duke
parents:
diff changeset
57 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
58 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
59 cname =
a61af66fc99e Initial load
duke
parents:
diff changeset
60 PerfDataManager::counter_name(name_space(), "avgInitialPause");
a61af66fc99e Initial load
duke
parents:
diff changeset
61 _avg_initial_pause_counter = PerfDataManager::create_variable(SUN_GC, cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
62 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
63 (jlong) cms_size_policy()->avg_initial_pause()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
64 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 cname = PerfDataManager::counter_name(name_space(), "avgRemarkPause");
a61af66fc99e Initial load
duke
parents:
diff changeset
67 _avg_remark_pause_counter = PerfDataManager::create_variable(SUN_GC, cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
68 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
69 (jlong) cms_size_policy()->avg_remark_pause()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
70 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 cname = PerfDataManager::counter_name(name_space(), "avgSTWGcCost");
a61af66fc99e Initial load
duke
parents:
diff changeset
73 _avg_cms_STW_gc_cost_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
74 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
75 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
76 (jlong) cms_size_policy()->avg_cms_STW_gc_cost()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
77 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
78
a61af66fc99e Initial load
duke
parents:
diff changeset
79 cname = PerfDataManager::counter_name(name_space(), "avgSTWTime");
a61af66fc99e Initial load
duke
parents:
diff changeset
80 _avg_cms_STW_time_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
81 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
82 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
83 (jlong) cms_size_policy()->avg_cms_STW_time()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
84 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
85
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 cname = PerfDataManager::counter_name(name_space(), "avgConcurrentTime");
a61af66fc99e Initial load
duke
parents:
diff changeset
88 _avg_concurrent_time_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
89 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
90 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
91 (jlong) cms_size_policy()->avg_concurrent_time()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
92 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
93
a61af66fc99e Initial load
duke
parents:
diff changeset
94 cname =
a61af66fc99e Initial load
duke
parents:
diff changeset
95 PerfDataManager::counter_name(name_space(), "avgConcurrentInterval");
a61af66fc99e Initial load
duke
parents:
diff changeset
96 _avg_concurrent_interval_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
97 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
98 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
99 (jlong) cms_size_policy()->avg_concurrent_interval()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
100 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 cname = PerfDataManager::counter_name(name_space(), "avgConcurrentGcCost");
a61af66fc99e Initial load
duke
parents:
diff changeset
103 _avg_concurrent_gc_cost_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
104 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
105 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
106 (jlong) cms_size_policy()->avg_concurrent_gc_cost()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
107 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
108
a61af66fc99e Initial load
duke
parents:
diff changeset
109 cname = PerfDataManager::counter_name(name_space(), "avgCMSFreeAtSweep");
a61af66fc99e Initial load
duke
parents:
diff changeset
110 _avg_cms_free_at_sweep_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
111 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
112 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
113 (jlong) cms_size_policy()->avg_cms_free_at_sweep()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
114 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 cname = PerfDataManager::counter_name(name_space(), "avgCMSFree");
a61af66fc99e Initial load
duke
parents:
diff changeset
117 _avg_cms_free_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
118 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
119 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
120 (jlong) cms_size_policy()->avg_cms_free()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
121 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
122
a61af66fc99e Initial load
duke
parents:
diff changeset
123 cname = PerfDataManager::counter_name(name_space(), "avgCMSPromo");
a61af66fc99e Initial load
duke
parents:
diff changeset
124 _avg_cms_promo_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
125 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
126 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
127 (jlong) cms_size_policy()->avg_cms_promo()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
128 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 cname = PerfDataManager::counter_name(name_space(), "avgMscPause");
a61af66fc99e Initial load
duke
parents:
diff changeset
131 _avg_msc_pause_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
132 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
133 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
134 (jlong) cms_size_policy()->avg_msc_pause()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
135 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 cname = PerfDataManager::counter_name(name_space(), "avgMscInterval");
a61af66fc99e Initial load
duke
parents:
diff changeset
138 _avg_msc_interval_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
139 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
140 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
141 (jlong) cms_size_policy()->avg_msc_interval()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
142 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 cname = PerfDataManager::counter_name(name_space(), "mscGcCost");
a61af66fc99e Initial load
duke
parents:
diff changeset
145 _msc_gc_cost_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
146 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
147 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
148 (jlong) cms_size_policy()->avg_msc_gc_cost()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
149 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 cname = PerfDataManager::counter_name(name_space(), "avgMsPause");
a61af66fc99e Initial load
duke
parents:
diff changeset
152 _avg_ms_pause_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
153 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
154 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
155 (jlong) cms_size_policy()->avg_ms_pause()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
156 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
157
a61af66fc99e Initial load
duke
parents:
diff changeset
158 cname = PerfDataManager::counter_name(name_space(), "avgMsInterval");
a61af66fc99e Initial load
duke
parents:
diff changeset
159 _avg_ms_interval_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
160 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
161 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
162 (jlong) cms_size_policy()->avg_ms_interval()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
163 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
164
a61af66fc99e Initial load
duke
parents:
diff changeset
165 cname = PerfDataManager::counter_name(name_space(), "msGcCost");
a61af66fc99e Initial load
duke
parents:
diff changeset
166 _ms_gc_cost_counter = PerfDataManager::create_variable(SUN_GC,
a61af66fc99e Initial load
duke
parents:
diff changeset
167 cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
168 PerfData::U_Ticks,
a61af66fc99e Initial load
duke
parents:
diff changeset
169 (jlong) cms_size_policy()->avg_ms_gc_cost()->average(),
a61af66fc99e Initial load
duke
parents:
diff changeset
170 CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
171
a61af66fc99e Initial load
duke
parents:
diff changeset
172 cname = PerfDataManager::counter_name(name_space(), "majorGcCost");
a61af66fc99e Initial load
duke
parents:
diff changeset
173 _major_gc_cost_counter = PerfDataManager::create_variable(SUN_GC, cname,
a61af66fc99e Initial load
duke
parents:
diff changeset
174 PerfData::U_Ticks, (jlong) cms_size_policy()->cms_gc_cost(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
175
a61af66fc99e Initial load
duke
parents:
diff changeset
176 cname = PerfDataManager::counter_name(name_space(), "avgPromotedAvg");
a61af66fc99e Initial load
duke
parents:
diff changeset
177 _promoted_avg_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
178 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
a61af66fc99e Initial load
duke
parents:
diff changeset
179 cms_size_policy()->calculated_promo_size_in_bytes(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
180
a61af66fc99e Initial load
duke
parents:
diff changeset
181 cname = PerfDataManager::counter_name(name_space(), "avgPromotedDev");
a61af66fc99e Initial load
duke
parents:
diff changeset
182 _promoted_avg_dev_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
183 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
a61af66fc99e Initial load
duke
parents:
diff changeset
184 (jlong) 0 , CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
185
a61af66fc99e Initial load
duke
parents:
diff changeset
186 cname = PerfDataManager::counter_name(name_space(), "avgPromotedPaddedAvg");
a61af66fc99e Initial load
duke
parents:
diff changeset
187 _promoted_padded_avg_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
188 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
a61af66fc99e Initial load
duke
parents:
diff changeset
189 cms_size_policy()->calculated_promo_size_in_bytes(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
190
a61af66fc99e Initial load
duke
parents:
diff changeset
191 cname = PerfDataManager::counter_name(name_space(),
a61af66fc99e Initial load
duke
parents:
diff changeset
192 "changeYoungGenForMajPauses");
a61af66fc99e Initial load
duke
parents:
diff changeset
193 _change_young_gen_for_maj_pauses_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
194 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
a61af66fc99e Initial load
duke
parents:
diff changeset
195 (jlong)0, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
196
a61af66fc99e Initial load
duke
parents:
diff changeset
197 cname = PerfDataManager::counter_name(name_space(), "remarkPauseOldSlope");
a61af66fc99e Initial load
duke
parents:
diff changeset
198 _remark_pause_old_slope_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
199 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
a61af66fc99e Initial load
duke
parents:
diff changeset
200 (jlong) cms_size_policy()->remark_pause_old_slope(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
201
a61af66fc99e Initial load
duke
parents:
diff changeset
202 cname = PerfDataManager::counter_name(name_space(), "initialPauseOldSlope");
a61af66fc99e Initial load
duke
parents:
diff changeset
203 _initial_pause_old_slope_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
204 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
a61af66fc99e Initial load
duke
parents:
diff changeset
205 (jlong) cms_size_policy()->initial_pause_old_slope(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
206
a61af66fc99e Initial load
duke
parents:
diff changeset
207 cname =
a61af66fc99e Initial load
duke
parents:
diff changeset
208 PerfDataManager::counter_name(name_space(), "remarkPauseYoungSlope") ;
a61af66fc99e Initial load
duke
parents:
diff changeset
209 _remark_pause_young_slope_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
210 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
a61af66fc99e Initial load
duke
parents:
diff changeset
211 (jlong) cms_size_policy()->remark_pause_young_slope(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 cname =
a61af66fc99e Initial load
duke
parents:
diff changeset
214 PerfDataManager::counter_name(name_space(), "initialPauseYoungSlope");
a61af66fc99e Initial load
duke
parents:
diff changeset
215 _initial_pause_young_slope_counter =
a61af66fc99e Initial load
duke
parents:
diff changeset
216 PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
a61af66fc99e Initial load
duke
parents:
diff changeset
217 (jlong) cms_size_policy()->initial_pause_young_slope(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
218
a61af66fc99e Initial load
duke
parents:
diff changeset
219
a61af66fc99e Initial load
duke
parents:
diff changeset
220 }
a61af66fc99e Initial load
duke
parents:
diff changeset
221 assert(size_policy()->is_gc_cms_adaptive_size_policy(),
a61af66fc99e Initial load
duke
parents:
diff changeset
222 "Wrong type of size policy");
a61af66fc99e Initial load
duke
parents:
diff changeset
223 }
a61af66fc99e Initial load
duke
parents:
diff changeset
224
a61af66fc99e Initial load
duke
parents:
diff changeset
225 void CMSGCAdaptivePolicyCounters::update_counters() {
a61af66fc99e Initial load
duke
parents:
diff changeset
226 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
227 GCAdaptivePolicyCounters::update_counters_from_policy();
a61af66fc99e Initial load
duke
parents:
diff changeset
228 update_counters_from_policy();
a61af66fc99e Initial load
duke
parents:
diff changeset
229 }
a61af66fc99e Initial load
duke
parents:
diff changeset
230 }
a61af66fc99e Initial load
duke
parents:
diff changeset
231
a61af66fc99e Initial load
duke
parents:
diff changeset
232 void CMSGCAdaptivePolicyCounters::update_counters(CMSGCStats* gc_stats) {
a61af66fc99e Initial load
duke
parents:
diff changeset
233 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
234 update_counters();
a61af66fc99e Initial load
duke
parents:
diff changeset
235 update_promoted((size_t) gc_stats->avg_promoted()->last_sample());
a61af66fc99e Initial load
duke
parents:
diff changeset
236 update_avg_promoted_avg(gc_stats);
a61af66fc99e Initial load
duke
parents:
diff changeset
237 update_avg_promoted_dev(gc_stats);
a61af66fc99e Initial load
duke
parents:
diff changeset
238 update_avg_promoted_padded_avg(gc_stats);
a61af66fc99e Initial load
duke
parents:
diff changeset
239 }
a61af66fc99e Initial load
duke
parents:
diff changeset
240 }
a61af66fc99e Initial load
duke
parents:
diff changeset
241
a61af66fc99e Initial load
duke
parents:
diff changeset
242 void CMSGCAdaptivePolicyCounters::update_counters_from_policy() {
a61af66fc99e Initial load
duke
parents:
diff changeset
243 if (UsePerfData && (cms_size_policy() != NULL)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
244
a61af66fc99e Initial load
duke
parents:
diff changeset
245 GCAdaptivePolicyCounters::update_counters_from_policy();
a61af66fc99e Initial load
duke
parents:
diff changeset
246
a61af66fc99e Initial load
duke
parents:
diff changeset
247 update_major_gc_cost_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
248 update_mutator_cost_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
249
a61af66fc99e Initial load
duke
parents:
diff changeset
250 update_eden_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
251 update_promo_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
252
a61af66fc99e Initial load
duke
parents:
diff changeset
253 // If these updates from the last_sample() work,
a61af66fc99e Initial load
duke
parents:
diff changeset
254 // revise the update methods for these counters
a61af66fc99e Initial load
duke
parents:
diff changeset
255 // (both here and in PS).
a61af66fc99e Initial load
duke
parents:
diff changeset
256 update_survived((size_t) cms_size_policy()->avg_survived()->last_sample());
a61af66fc99e Initial load
duke
parents:
diff changeset
257
a61af66fc99e Initial load
duke
parents:
diff changeset
258 update_avg_concurrent_time_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
259 update_avg_concurrent_interval_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
260 update_avg_concurrent_gc_cost_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
261 #ifdef NOT_PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
262 update_initial_pause_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
263 update_remark_pause_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
264 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
265 update_avg_initial_pause_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
266 update_avg_remark_pause_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
267
a61af66fc99e Initial load
duke
parents:
diff changeset
268 update_avg_cms_STW_time_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
269 update_avg_cms_STW_gc_cost_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
270
a61af66fc99e Initial load
duke
parents:
diff changeset
271 update_avg_cms_free_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
272 update_avg_cms_free_at_sweep_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
273 update_avg_cms_promo_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
274
a61af66fc99e Initial load
duke
parents:
diff changeset
275 update_avg_msc_pause_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
276 update_avg_msc_interval_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
277 update_msc_gc_cost_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
278
a61af66fc99e Initial load
duke
parents:
diff changeset
279 update_avg_ms_pause_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
280 update_avg_ms_interval_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
281 update_ms_gc_cost_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
282
a61af66fc99e Initial load
duke
parents:
diff changeset
283 update_avg_old_live_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
284
a61af66fc99e Initial load
duke
parents:
diff changeset
285 update_survivor_size_counters();
a61af66fc99e Initial load
duke
parents:
diff changeset
286 update_avg_survived_avg_counters();
a61af66fc99e Initial load
duke
parents:
diff changeset
287 update_avg_survived_dev_counters();
a61af66fc99e Initial load
duke
parents:
diff changeset
288
a61af66fc99e Initial load
duke
parents:
diff changeset
289 update_decrement_tenuring_threshold_for_gc_cost();
a61af66fc99e Initial load
duke
parents:
diff changeset
290 update_increment_tenuring_threshold_for_gc_cost();
a61af66fc99e Initial load
duke
parents:
diff changeset
291 update_decrement_tenuring_threshold_for_survivor_limit();
a61af66fc99e Initial load
duke
parents:
diff changeset
292
a61af66fc99e Initial load
duke
parents:
diff changeset
293 update_change_young_gen_for_maj_pauses();
a61af66fc99e Initial load
duke
parents:
diff changeset
294
a61af66fc99e Initial load
duke
parents:
diff changeset
295 update_major_collection_slope_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
296 update_remark_pause_old_slope_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
297 update_initial_pause_old_slope_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
298 update_remark_pause_young_slope_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
299 update_initial_pause_young_slope_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
300
a61af66fc99e Initial load
duke
parents:
diff changeset
301 update_decide_at_full_gc_counter();
a61af66fc99e Initial load
duke
parents:
diff changeset
302 }
a61af66fc99e Initial load
duke
parents:
diff changeset
303 }