1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSGCADAPTIVEPOLICYCOUNTERS_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSGCADAPTIVEPOLICYCOUNTERS_HPP
27
28 #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp"
29 #include "gc_implementation/shared/gcAdaptivePolicyCounters.hpp"
30 #include "gc_implementation/shared/gcPolicyCounters.hpp"
31
32 // PSGCAdaptivePolicyCounters is a holder class for performance counters
33 // that track the data and decisions for the ergonomics policy for the
34 // parallel scavenge collector.
35
36 class PSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
37 friend class VMStructs;
38
39 private:
40 // survivor space vs. tenuring threshold
41 PerfVariable* _old_promo_size;
42 PerfVariable* _old_eden_size;
43 PerfVariable* _avg_promoted_avg_counter;
44 PerfVariable* _avg_promoted_dev_counter;
45 PerfVariable* _avg_promoted_padded_avg_counter;
46 PerfVariable* _avg_pretenured_padded_avg;
47
48 // young gen vs. old gen sizing
49 PerfVariable* _avg_major_pause;
50 PerfVariable* _avg_major_interval;
191
192 inline void update_full_follows_scavenge(int event) {
193 _full_follows_scavenge->set_value(event);
194 }
195
196 // Update all the counters that can be updated from the size policy.
197 // This should be called after all policy changes have been made
198 // and reflected internally in the size policy.
199 void update_counters_from_policy();
200
201 // Update counters that can be updated from fields internal to the
202 // counter or from globals. This is distinguished from counters
203 // that are updated via input parameters.
204 void update_counters();
205
206 virtual GCPolicyCounters::Name kind() const {
207 return GCPolicyCounters::PSGCAdaptivePolicyCountersKind;
208 }
209 };
210
211 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSGCADAPTIVEPOLICYCOUNTERS_HPP
|
1 /*
2 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_PARALLEL_PSGCADAPTIVEPOLICYCOUNTERS_HPP
26 #define SHARE_VM_GC_PARALLEL_PSGCADAPTIVEPOLICYCOUNTERS_HPP
27
28 #include "gc/parallel/psAdaptiveSizePolicy.hpp"
29 #include "gc/shared/gcAdaptivePolicyCounters.hpp"
30 #include "gc/shared/gcPolicyCounters.hpp"
31
32 // PSGCAdaptivePolicyCounters is a holder class for performance counters
33 // that track the data and decisions for the ergonomics policy for the
34 // parallel scavenge collector.
35
36 class PSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
37 friend class VMStructs;
38
39 private:
40 // survivor space vs. tenuring threshold
41 PerfVariable* _old_promo_size;
42 PerfVariable* _old_eden_size;
43 PerfVariable* _avg_promoted_avg_counter;
44 PerfVariable* _avg_promoted_dev_counter;
45 PerfVariable* _avg_promoted_padded_avg_counter;
46 PerfVariable* _avg_pretenured_padded_avg;
47
48 // young gen vs. old gen sizing
49 PerfVariable* _avg_major_pause;
50 PerfVariable* _avg_major_interval;
191
192 inline void update_full_follows_scavenge(int event) {
193 _full_follows_scavenge->set_value(event);
194 }
195
196 // Update all the counters that can be updated from the size policy.
197 // This should be called after all policy changes have been made
198 // and reflected internally in the size policy.
199 void update_counters_from_policy();
200
201 // Update counters that can be updated from fields internal to the
202 // counter or from globals. This is distinguished from counters
203 // that are updated via input parameters.
204 void update_counters();
205
206 virtual GCPolicyCounters::Name kind() const {
207 return GCPolicyCounters::PSGCAdaptivePolicyCountersKind;
208 }
209 };
210
211 #endif // SHARE_VM_GC_PARALLEL_PSGCADAPTIVEPOLICYCOUNTERS_HPP
|