author | jmasa |
Mon, 16 Jul 2012 13:00:26 -0700 | |
changeset 13289 | 0f61d0bac1ca |
parent 13288 | 331d5b6725f3 |
child 13516 | f7adc27fb367 |
permissions | -rw-r--r-- |
13288
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
1 |
/* |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
2 |
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
4 |
* |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
8 |
* |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
13 |
* accompanied this code). |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
14 |
* |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
18 |
* |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
21 |
* questions. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
22 |
* |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
23 |
*/ |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
24 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
25 |
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
26 |
#define SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
27 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
28 |
#include "memory/allocation.hpp" |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
29 |
#include "gc_interface/gcCause.hpp" |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
30 |
|
13289 | 31 |
class G1GCPhaseTimes : public CHeapObj<mtGC> { |
13288
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
32 |
friend class G1CollectorPolicy; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
33 |
friend class TraceGen0TimeData; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
34 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
35 |
private: |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
36 |
uint _active_gc_threads; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
37 |
uint _max_gc_threads; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
38 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
39 |
GCCause::Cause _gc_cause; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
40 |
bool _is_young_gc; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
41 |
bool _is_initial_mark_gc; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
42 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
43 |
double _pause_start_time_sec; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
44 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
45 |
double* _par_last_gc_worker_start_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
46 |
double* _par_last_ext_root_scan_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
47 |
double* _par_last_satb_filtering_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
48 |
double* _par_last_update_rs_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
49 |
double* _par_last_update_rs_processed_buffers; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
50 |
double* _par_last_scan_rs_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
51 |
double* _par_last_obj_copy_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
52 |
double* _par_last_termination_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
53 |
double* _par_last_termination_attempts; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
54 |
double* _par_last_gc_worker_end_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
55 |
double* _par_last_gc_worker_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
56 |
double* _par_last_gc_worker_other_times_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
57 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
58 |
double _cur_collection_par_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
59 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
60 |
double _cur_collection_code_root_fixup_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
61 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
62 |
double _cur_clear_ct_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
63 |
double _cur_ref_proc_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
64 |
double _cur_ref_enq_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
65 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
66 |
// Helper methods for detailed logging |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
67 |
void print_par_stats(int level, const char* str, double* data, bool showDecimals = true); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
68 |
void print_stats(int level, const char* str, double value); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
69 |
void print_stats(int level, const char* str, double value, int workers); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
70 |
void print_stats(int level, const char* str, int value); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
71 |
double avg_value(double* data); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
72 |
double max_value(double* data); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
73 |
double sum_of_values(double* data); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
74 |
double max_sum(double* data1, double* data2); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
75 |
double accounted_time_ms(); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
76 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
77 |
// Card Table Count Cache stats |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
78 |
double _min_clear_cc_time_ms; // min |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
79 |
double _max_clear_cc_time_ms; // max |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
80 |
double _cur_clear_cc_time_ms; // clearing time during current pause |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
81 |
double _cum_clear_cc_time_ms; // cummulative clearing time |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
82 |
jlong _num_cc_clears; // number of times the card count cache has been cleared |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
83 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
84 |
// The following insance variables are directly accessed by G1CollectorPolicy |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
85 |
// and TraceGen0TimeData. This is why those classes are declared friends. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
86 |
// An alternative is to add getters and setters for all of these fields. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
87 |
// It might also be possible to restructure the code to reduce these |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
88 |
// dependencies. |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
89 |
double _ext_root_scan_time; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
90 |
double _satb_filtering_time; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
91 |
double _update_rs_time; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
92 |
double _update_rs_processed_buffers; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
93 |
double _scan_rs_time; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
94 |
double _obj_copy_time; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
95 |
double _termination_time; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
96 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
97 |
double _cur_collection_start_sec; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
98 |
double _root_region_scan_wait_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
99 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
100 |
double _recorded_young_cset_choice_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
101 |
double _recorded_non_young_cset_choice_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
102 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
103 |
double _recorded_young_free_cset_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
104 |
double _recorded_non_young_free_cset_time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
105 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
106 |
void print(double pause_time_ms); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
107 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
108 |
public: |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
109 |
G1GCPhaseTimes(uint max_gc_threads); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
110 |
void note_gc_start(double pause_start_time_sec, uint active_gc_threads, |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
111 |
bool is_young_gc, bool is_initial_mark_gc, GCCause::Cause gc_cause); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
112 |
void note_gc_end(double pause_end_time_sec); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
113 |
void collapse_par_times(); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
114 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
115 |
void record_gc_worker_start_time(uint worker_i, double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
116 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
117 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
118 |
_par_last_gc_worker_start_times_ms[worker_i] = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
119 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
120 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
121 |
void record_ext_root_scan_time(uint worker_i, double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
122 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
123 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
124 |
_par_last_ext_root_scan_times_ms[worker_i] = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
125 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
126 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
127 |
void record_satb_filtering_time(uint worker_i, double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
128 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
129 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
130 |
_par_last_satb_filtering_times_ms[worker_i] = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
131 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
132 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
133 |
void record_update_rs_time(uint worker_i, double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
134 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
135 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
136 |
_par_last_update_rs_times_ms[worker_i] = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
137 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
138 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
139 |
void record_update_rs_processed_buffers (uint worker_i, |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
140 |
double processed_buffers) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
141 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
142 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
143 |
_par_last_update_rs_processed_buffers[worker_i] = processed_buffers; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
144 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
145 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
146 |
void record_scan_rs_time(uint worker_i, double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
147 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
148 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
149 |
_par_last_scan_rs_times_ms[worker_i] = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
150 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
151 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
152 |
void reset_obj_copy_time(uint worker_i) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
153 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
154 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
155 |
_par_last_obj_copy_times_ms[worker_i] = 0.0; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
156 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
157 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
158 |
void reset_obj_copy_time() { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
159 |
reset_obj_copy_time(0); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
160 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
161 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
162 |
void record_obj_copy_time(uint worker_i, double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
163 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
164 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
165 |
_par_last_obj_copy_times_ms[worker_i] += ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
166 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
167 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
168 |
void record_termination(uint worker_i, double ms, size_t attempts) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
169 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
170 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
171 |
_par_last_termination_times_ms[worker_i] = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
172 |
_par_last_termination_attempts[worker_i] = (double) attempts; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
173 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
174 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
175 |
void record_gc_worker_end_time(uint worker_i, double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
176 |
assert(worker_i >= 0, "worker index must be > 0"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
177 |
assert(worker_i < _active_gc_threads, "worker index out of bounds"); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
178 |
_par_last_gc_worker_end_times_ms[worker_i] = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
179 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
180 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
181 |
void record_clear_ct_time(double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
182 |
_cur_clear_ct_time_ms = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
183 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
184 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
185 |
void record_par_time(double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
186 |
_cur_collection_par_time_ms = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
187 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
188 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
189 |
void record_code_root_fixup_time(double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
190 |
_cur_collection_code_root_fixup_time_ms = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
191 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
192 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
193 |
void record_ref_proc_time(double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
194 |
_cur_ref_proc_time_ms = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
195 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
196 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
197 |
void record_ref_enq_time(double ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
198 |
_cur_ref_enq_time_ms = ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
199 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
200 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
201 |
void record_root_region_scan_wait_time(double time_ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
202 |
_root_region_scan_wait_time_ms = time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
203 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
204 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
205 |
void record_cc_clear_time_ms(double ms); |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
206 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
207 |
void record_young_free_cset_time_ms(double time_ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
208 |
_recorded_young_free_cset_time_ms = time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
209 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
210 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
211 |
void record_non_young_free_cset_time_ms(double time_ms) { |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
212 |
_recorded_non_young_free_cset_time_ms = time_ms; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
213 |
} |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
214 |
}; |
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
215 |
|
331d5b6725f3
7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff
changeset
|
216 |
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP |