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_G1_G1GCPHASETIMES_HPP
26 #define SHARE_VM_GC_G1_G1GCPHASETIMES_HPP
27
28 #include "memory/allocation.hpp"
29
30 class LineBuffer;
31
32 template <class T> class WorkerDataArray;
33
34 class G1GCPhaseTimes : public CHeapObj<mtGC> {
35 uint _active_gc_threads;
36 uint _max_gc_threads;
37 jlong _gc_start_counter;
38 double _gc_pause_time_ms;
39
40 public:
41 enum GCParPhases {
42 GCWorkerStart,
43 ExtRootScan,
44 ThreadRoots,
45 StringTableRoots,
46 UniverseRoots,
47 JNIRoots,
48 ObjectSynchronizerRoots,
49 FlatProfilerRoots,
50 ManagementRoots,
51 SystemDictionaryRoots,
52 CLDGRoots,
53 JVMTIRoots,
54 CMRefRoots,
55 WaitForStrongCLD,
106 double _recorded_non_young_cset_choice_time_ms;
107
108 double _recorded_redirty_logged_cards_time_ms;
109
110 double _recorded_preserve_cm_referents_time_ms;
111
112 double _recorded_merge_pss_time_ms;
113
114 double _recorded_young_free_cset_time_ms;
115 double _recorded_non_young_free_cset_time_ms;
116
117 double _cur_fast_reclaim_humongous_time_ms;
118 double _cur_fast_reclaim_humongous_register_time_ms;
119 size_t _cur_fast_reclaim_humongous_total;
120 size_t _cur_fast_reclaim_humongous_candidates;
121 size_t _cur_fast_reclaim_humongous_reclaimed;
122
123 double _cur_verify_before_time_ms;
124 double _cur_verify_after_time_ms;
125
126 void note_gc_end();
127
128 template <class T>
129 void details(T* phase, const char* indent);
130 void log_phase(WorkerDataArray<double>* phase, uint indent, outputStream* out, bool print_sum);
131 void debug_phase(WorkerDataArray<double>* phase);
132 void trace_phase(WorkerDataArray<double>* phase, bool print_sum = true);
133
134 public:
135 G1GCPhaseTimes(uint max_gc_threads);
136 void note_gc_start(uint active_gc_threads);
137 void print();
138
139 // record the time a phase took in seconds
140 void record_time_secs(GCParPhases phase, uint worker_i, double secs);
141
142 // add a number of seconds to a phase
143 void add_time_secs(GCParPhases phase, uint worker_i, double secs);
144
145 void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count);
146
147 // return the average time for a phase in milliseconds
148 double average_time_ms(GCParPhases phase);
149
150 size_t sum_thread_work_items(GCParPhases phase);
151
152 public:
153
154 void record_clear_ct_time(double ms) {
155 _cur_clear_ct_time_ms = ms;
156 }
|
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_G1_G1GCPHASETIMES_HPP
26 #define SHARE_VM_GC_G1_G1GCPHASETIMES_HPP
27
28 #include "memory/allocation.hpp"
29
30 class LineBuffer;
31
32 template <class T> class WorkerDataArray;
33
34 class G1GCPhaseTimes : public CHeapObj<mtGC> {
35 uint _max_gc_threads;
36 jlong _gc_start_counter;
37 double _gc_pause_time_ms;
38
39 public:
40 enum GCParPhases {
41 GCWorkerStart,
42 ExtRootScan,
43 ThreadRoots,
44 StringTableRoots,
45 UniverseRoots,
46 JNIRoots,
47 ObjectSynchronizerRoots,
48 FlatProfilerRoots,
49 ManagementRoots,
50 SystemDictionaryRoots,
51 CLDGRoots,
52 JVMTIRoots,
53 CMRefRoots,
54 WaitForStrongCLD,
105 double _recorded_non_young_cset_choice_time_ms;
106
107 double _recorded_redirty_logged_cards_time_ms;
108
109 double _recorded_preserve_cm_referents_time_ms;
110
111 double _recorded_merge_pss_time_ms;
112
113 double _recorded_young_free_cset_time_ms;
114 double _recorded_non_young_free_cset_time_ms;
115
116 double _cur_fast_reclaim_humongous_time_ms;
117 double _cur_fast_reclaim_humongous_register_time_ms;
118 size_t _cur_fast_reclaim_humongous_total;
119 size_t _cur_fast_reclaim_humongous_candidates;
120 size_t _cur_fast_reclaim_humongous_reclaimed;
121
122 double _cur_verify_before_time_ms;
123 double _cur_verify_after_time_ms;
124
125 double worker_time(GCParPhases phase, uint worker);
126 void note_gc_end();
127
128 template <class T>
129 void details(T* phase, const char* indent);
130 void log_phase(WorkerDataArray<double>* phase, uint indent, outputStream* out, bool print_sum);
131 void debug_phase(WorkerDataArray<double>* phase);
132 void trace_phase(WorkerDataArray<double>* phase, bool print_sum = true);
133
134 public:
135 G1GCPhaseTimes(uint max_gc_threads);
136 void note_gc_start();
137 void print();
138
139 // record the time a phase took in seconds
140 void record_time_secs(GCParPhases phase, uint worker_i, double secs);
141
142 // add a number of seconds to a phase
143 void add_time_secs(GCParPhases phase, uint worker_i, double secs);
144
145 void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count);
146
147 // return the average time for a phase in milliseconds
148 double average_time_ms(GCParPhases phase);
149
150 size_t sum_thread_work_items(GCParPhases phase);
151
152 public:
153
154 void record_clear_ct_time(double ms) {
155 _cur_clear_ct_time_ms = ms;
156 }
|