annotate src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp @ 20382:b1266b08b994

8056043: Heap does not shrink within the heap after JDK-8038423 Summary: Enable shrinking within the heap by removing some code added for JDK-8054818. Enable the test case that checks that again too. Reviewed-by: jwilhelm, jmasa
author tschatzl
date Wed, 03 Sep 2014 09:24:07 +0200
parents a3953c777565
children 7baf47cb97cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
1 /*
17753
191174b49bec 8035406: Improve data structure for Code Cache remembered sets
tschatzl
parents: 12080
diff changeset
2 * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
6219
922993931b3d 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.
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
4 *
922993931b3d 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
922993931b3d 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
922993931b3d 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.
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
8 *
922993931b3d 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
922993931b3d 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
922993931b3d 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
922993931b3d 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
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
13 * accompanied this code).
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
14 *
922993931b3d 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
922993931b3d 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,
922993931b3d 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.
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
18 *
922993931b3d 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
922993931b3d 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
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
21 * questions.
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
22 *
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
23 */
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
24
922993931b3d 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
922993931b3d 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
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
27
922993931b3d 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"
922993931b3d 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"
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
30
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
31 template <class T>
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
32 class WorkerDataArray : public CHeapObj<mtGC> {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
33 T* _data;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
34 uint _length;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
35 const char* _print_format;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
36 bool _print_sum;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
37
7633
7df93f7c14a5 8006242: G1: WorkerDataArray<T>::verify() too strict for double calculations
brutisso
parents: 6628
diff changeset
38 NOT_PRODUCT(static const T _uninitialized;)
7df93f7c14a5 8006242: G1: WorkerDataArray<T>::verify() too strict for double calculations
brutisso
parents: 6628
diff changeset
39
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
40 // We are caching the sum and average to only have to calculate them once.
10405
f2110083203d 8005849: JEP 167: Event-Based JVM Tracing
sla
parents: 10246
diff changeset
41 // This is not done in an MT-safe way. It is intended to allow single
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
42 // threaded code to call sum() and average() multiple times in any order
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
43 // without having to worry about the cost.
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
44 bool _has_new_data;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
45 T _sum;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
46 double _average;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
47
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
48 public:
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
49 WorkerDataArray(uint length, const char* print_format, bool print_sum = true) :
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
50 _length(length), _print_format(print_format), _print_sum(print_sum), _has_new_data(true) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
51 assert(length > 0, "Must have some workers to store data for");
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
52 _data = NEW_C_HEAP_ARRAY(T, _length, mtGC);
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
53 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
54
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
55 ~WorkerDataArray() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
56 FREE_C_HEAP_ARRAY(T, _data, mtGC);
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
57 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
58
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
59 void set(uint worker_i, T value) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
60 assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
61 assert(_data[worker_i] == (T)-1, err_msg("Overwriting data for worker %d", worker_i));
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
62 _data[worker_i] = value;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
63 _has_new_data = true;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
64 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
65
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
66 T get(uint worker_i) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
67 assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
68 assert(_data[worker_i] != (T)-1, err_msg("No data to add to for worker %d", worker_i));
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
69 return _data[worker_i];
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
70 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
71
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
72 void add(uint worker_i, T value) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
73 assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
74 assert(_data[worker_i] != (T)-1, err_msg("No data to add to for worker %d", worker_i));
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
75 _data[worker_i] += value;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
76 _has_new_data = true;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
77 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
78
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
79 double average(){
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
80 if (_has_new_data) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
81 calculate_totals();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
82 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
83 return _average;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
84 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
85
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
86 T sum() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
87 if (_has_new_data) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
88 calculate_totals();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
89 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
90 return _sum;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
91 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
92
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
93 void print(int level, const char* title);
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
94
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
95 void reset() PRODUCT_RETURN;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
96 void verify() PRODUCT_RETURN;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
97
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
98 private:
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
99
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
100 void calculate_totals(){
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
101 _sum = (T)0;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
102 for (uint i = 0; i < _length; ++i) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
103 _sum += _data[i];
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
104 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
105 _average = (double)_sum / (double)_length;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
106 _has_new_data = false;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
107 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
108 };
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
109
6220
jmasa
parents: 6219
diff changeset
110 class G1GCPhaseTimes : public CHeapObj<mtGC> {
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
111
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
112 private:
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
113 uint _active_gc_threads;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
114 uint _max_gc_threads;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
115
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
116 WorkerDataArray<double> _last_gc_worker_start_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
117 WorkerDataArray<double> _last_ext_root_scan_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
118 WorkerDataArray<double> _last_satb_filtering_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
119 WorkerDataArray<double> _last_update_rs_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
120 WorkerDataArray<int> _last_update_rs_processed_buffers;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
121 WorkerDataArray<double> _last_scan_rs_times_ms;
12080
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
122 WorkerDataArray<double> _last_strong_code_root_scan_times_ms;
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
123 WorkerDataArray<double> _last_obj_copy_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
124 WorkerDataArray<double> _last_termination_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
125 WorkerDataArray<size_t> _last_termination_attempts;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
126 WorkerDataArray<double> _last_gc_worker_end_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
127 WorkerDataArray<double> _last_gc_worker_times_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
128 WorkerDataArray<double> _last_gc_worker_other_times_ms;
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
129
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
130 double _cur_collection_par_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
131 double _cur_collection_code_root_fixup_time_ms;
12080
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
132 double _cur_strong_code_root_migration_time_ms;
17753
191174b49bec 8035406: Improve data structure for Code Cache remembered sets
tschatzl
parents: 12080
diff changeset
133 double _cur_strong_code_root_purge_time_ms;
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
134
17757
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
135 double _cur_evac_fail_recalc_used;
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
136 double _cur_evac_fail_restore_remsets;
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
137 double _cur_evac_fail_remove_self_forwards;
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
138
17764
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
139 double _cur_string_dedup_fixup_time_ms;
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
140 WorkerDataArray<double> _cur_string_dedup_queue_fixup_worker_times_ms;
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
141 WorkerDataArray<double> _cur_string_dedup_table_fixup_worker_times_ms;
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
142
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
143 double _cur_clear_ct_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
144 double _cur_ref_proc_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
145 double _cur_ref_enq_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
146
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
147 double _cur_collection_start_sec;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
148 double _root_region_scan_wait_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
149
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
150 double _recorded_young_cset_choice_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
151 double _recorded_non_young_cset_choice_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
152
20216
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
153 WorkerDataArray<double> _last_redirty_logged_cards_time_ms;
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
154 WorkerDataArray<size_t> _last_redirty_logged_cards_processed_cards;
17756
a07bea31ef35 8035398: Add card redirty time in "Other" time in G1
tschatzl
parents: 17753
diff changeset
155 double _recorded_redirty_logged_cards_time_ms;
a07bea31ef35 8035398: Add card redirty time in "Other" time in G1
tschatzl
parents: 17753
diff changeset
156
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
157 double _recorded_young_free_cset_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
158 double _recorded_non_young_free_cset_time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
159
20296
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
160 double _cur_fast_reclaim_humongous_time_ms;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
161 size_t _cur_fast_reclaim_humongous_total;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
162 size_t _cur_fast_reclaim_humongous_candidates;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
163 size_t _cur_fast_reclaim_humongous_reclaimed;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
164
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
165 double _cur_verify_before_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
166 double _cur_verify_after_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
167
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
168 // Helper methods for detailed logging
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
169 void print_stats(int level, const char* str, double value);
20296
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
170 void print_stats(int level, const char* str, size_t value);
17844
8847586c9037 8016302: Change type of the number of GC workers to unsigned int (2)
vkempik
parents: 17764
diff changeset
171 void print_stats(int level, const char* str, double value, uint workers);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
172
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
173 public:
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
174 G1GCPhaseTimes(uint max_gc_threads);
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
175 void note_gc_start(uint active_gc_threads);
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
176 void note_gc_end();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
177 void print(double pause_time_sec);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
178
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
179 void record_gc_worker_start_time(uint worker_i, double ms) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
180 _last_gc_worker_start_times_ms.set(worker_i, ms);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
181 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
182
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
183 void record_ext_root_scan_time(uint worker_i, double ms) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
184 _last_ext_root_scan_times_ms.set(worker_i, ms);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
185 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
186
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
187 void record_satb_filtering_time(uint worker_i, double ms) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
188 _last_satb_filtering_times_ms.set(worker_i, ms);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
189 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
190
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
191 void record_update_rs_time(uint worker_i, double ms) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
192 _last_update_rs_times_ms.set(worker_i, ms);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
193 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
194
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
195 void record_update_rs_processed_buffers(uint worker_i, int processed_buffers) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
196 _last_update_rs_processed_buffers.set(worker_i, processed_buffers);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
197 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
198
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
199 void record_scan_rs_time(uint worker_i, double ms) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
200 _last_scan_rs_times_ms.set(worker_i, ms);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
201 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
202
12080
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
203 void record_strong_code_root_scan_time(uint worker_i, double ms) {
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
204 _last_strong_code_root_scan_times_ms.set(worker_i, ms);
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
205 }
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
206
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
207 void record_obj_copy_time(uint worker_i, double ms) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
208 _last_obj_copy_times_ms.set(worker_i, ms);
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
209 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
210
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
211 void add_obj_copy_time(uint worker_i, double ms) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
212 _last_obj_copy_times_ms.add(worker_i, ms);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
213 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
214
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
215 void record_termination(uint worker_i, double ms, size_t attempts) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
216 _last_termination_times_ms.set(worker_i, ms);
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
217 _last_termination_attempts.set(worker_i, attempts);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
218 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
220 void record_gc_worker_end_time(uint worker_i, double ms) {
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
221 _last_gc_worker_end_times_ms.set(worker_i, ms);
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
222 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
223
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
224 void record_clear_ct_time(double ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
225 _cur_clear_ct_time_ms = ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
226 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
227
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
228 void record_par_time(double ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
229 _cur_collection_par_time_ms = ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
230 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
231
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
232 void record_code_root_fixup_time(double ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
233 _cur_collection_code_root_fixup_time_ms = ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
234 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
235
12080
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
236 void record_strong_code_root_migration_time(double ms) {
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
237 _cur_strong_code_root_migration_time_ms = ms;
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
238 }
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
239
17753
191174b49bec 8035406: Improve data structure for Code Cache remembered sets
tschatzl
parents: 12080
diff changeset
240 void record_strong_code_root_purge_time(double ms) {
191174b49bec 8035406: Improve data structure for Code Cache remembered sets
tschatzl
parents: 12080
diff changeset
241 _cur_strong_code_root_purge_time_ms = ms;
191174b49bec 8035406: Improve data structure for Code Cache remembered sets
tschatzl
parents: 12080
diff changeset
242 }
191174b49bec 8035406: Improve data structure for Code Cache remembered sets
tschatzl
parents: 12080
diff changeset
243
17757
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
244 void record_evac_fail_recalc_used_time(double ms) {
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
245 _cur_evac_fail_recalc_used = ms;
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
246 }
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
247
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
248 void record_evac_fail_restore_remsets(double ms) {
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
249 _cur_evac_fail_restore_remsets = ms;
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
250 }
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
251
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
252 void record_evac_fail_remove_self_forwards(double ms) {
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
253 _cur_evac_fail_remove_self_forwards = ms;
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
254 }
eff02b5bd56c 8035654: Add times for evacuation failure handling in "Other" time
tschatzl
parents: 17756
diff changeset
255
17764
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
256 void note_string_dedup_fixup_start();
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
257 void note_string_dedup_fixup_end();
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
258
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
259 void record_string_dedup_fixup_time(double ms) {
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
260 _cur_string_dedup_fixup_time_ms = ms;
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
261 }
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
262
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
263 void record_string_dedup_queue_fixup_worker_time(uint worker_id, double ms) {
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
264 _cur_string_dedup_queue_fixup_worker_times_ms.set(worker_id, ms);
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
265 }
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
266
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
267 void record_string_dedup_table_fixup_worker_time(uint worker_id, double ms) {
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
268 _cur_string_dedup_table_fixup_worker_times_ms.set(worker_id, ms);
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
269 }
595c0f60d50d 8029075: String deduplication in G1
pliden
parents: 17757
diff changeset
270
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
271 void record_ref_proc_time(double ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
272 _cur_ref_proc_time_ms = ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
273 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
274
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
275 void record_ref_enq_time(double ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
276 _cur_ref_enq_time_ms = ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
277 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
278
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
279 void record_root_region_scan_wait_time(double time_ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
280 _root_region_scan_wait_time_ms = time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
281 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
282
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
283 void record_young_free_cset_time_ms(double time_ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
284 _recorded_young_free_cset_time_ms = time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
285 }
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
286
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
287 void record_non_young_free_cset_time_ms(double time_ms) {
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
288 _recorded_non_young_free_cset_time_ms = time_ms;
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
289 }
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
290
20296
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
291 void record_fast_reclaim_humongous_stats(size_t total, size_t candidates) {
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
292 _cur_fast_reclaim_humongous_total = total;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
293 _cur_fast_reclaim_humongous_candidates = candidates;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
294 }
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
295
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
296 void record_fast_reclaim_humongous_time_ms(double value, size_t reclaimed) {
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
297 _cur_fast_reclaim_humongous_time_ms = value;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
298 _cur_fast_reclaim_humongous_reclaimed = reclaimed;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
299 }
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
300
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
301 void record_young_cset_choice_time_ms(double time_ms) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
302 _recorded_young_cset_choice_time_ms = time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
303 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
304
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
305 void record_non_young_cset_choice_time_ms(double time_ms) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
306 _recorded_non_young_cset_choice_time_ms = time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
307 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
308
20216
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
309 void record_redirty_logged_cards_time_ms(uint worker_i, double time_ms) {
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
310 _last_redirty_logged_cards_time_ms.set(worker_i, time_ms);
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
311 }
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
312
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
313 void record_redirty_logged_cards_processed_cards(uint worker_i, size_t processed_buffers) {
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
314 _last_redirty_logged_cards_processed_cards.set(worker_i, processed_buffers);
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
315 }
570cb6369f17 8019342: G1: High "Other" time most likely due to card redirtying
tschatzl
parents: 17844
diff changeset
316
17756
a07bea31ef35 8035398: Add card redirty time in "Other" time in G1
tschatzl
parents: 17753
diff changeset
317 void record_redirty_logged_cards_time_ms(double time_ms) {
a07bea31ef35 8035398: Add card redirty time in "Other" time in G1
tschatzl
parents: 17753
diff changeset
318 _recorded_redirty_logged_cards_time_ms = time_ms;
a07bea31ef35 8035398: Add card redirty time in "Other" time in G1
tschatzl
parents: 17753
diff changeset
319 }
a07bea31ef35 8035398: Add card redirty time in "Other" time in G1
tschatzl
parents: 17753
diff changeset
320
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
321 void record_cur_collection_start_sec(double time_ms) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
322 _cur_collection_start_sec = time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
323 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
324
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
325 void record_verify_before_time_ms(double time_ms) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
326 _cur_verify_before_time_ms = time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
327 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
328
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
329 void record_verify_after_time_ms(double time_ms) {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
330 _cur_verify_after_time_ms = time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
331 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
332
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
333 double accounted_time_ms();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
334
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
335 double cur_collection_start_sec() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
336 return _cur_collection_start_sec;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
337 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
338
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
339 double cur_collection_par_time_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
340 return _cur_collection_par_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
341 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
342
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
343 double cur_clear_ct_time_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
344 return _cur_clear_ct_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
345 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
346
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
347 double root_region_scan_wait_time_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
348 return _root_region_scan_wait_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
349 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
350
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
351 double young_cset_choice_time_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
352 return _recorded_young_cset_choice_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
353 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
354
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
355 double young_free_cset_time_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
356 return _recorded_young_free_cset_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
357 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
358
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
359 double non_young_cset_choice_time_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
360 return _recorded_non_young_cset_choice_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
361 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
362
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
363 double non_young_free_cset_time_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
364 return _recorded_non_young_free_cset_time_ms;
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
365 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
366
20296
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
367 double fast_reclaim_humongous_time_ms() {
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
368 return _cur_fast_reclaim_humongous_time_ms;
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
369 }
a3953c777565 8027959: Early reclamation of large objects in G1
tschatzl
parents: 20278
diff changeset
370
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
371 double average_last_update_rs_time() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
372 return _last_update_rs_times_ms.average();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
373 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
374
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
375 int sum_last_update_rs_processed_buffers() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
376 return _last_update_rs_processed_buffers.sum();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
377 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
378
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
379 double average_last_scan_rs_time(){
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
380 return _last_scan_rs_times_ms.average();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
381 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
382
12080
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
383 double average_last_strong_code_root_scan_time(){
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
384 return _last_strong_code_root_scan_times_ms.average();
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
385 }
5888334c9c24 7145569: G1: optimize nmethods scanning
johnc
parents: 10405
diff changeset
386
6628
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
387 double average_last_obj_copy_time() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
388 return _last_obj_copy_times_ms.average();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
389 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
390
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
391 double average_last_termination_time() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
392 return _last_termination_times_ms.average();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
393 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
394
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
395 double average_last_ext_root_scan_time() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
396 return _last_ext_root_scan_times_ms.average();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
397 }
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
398
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
399 double average_last_satb_filtering_times_ms() {
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
400 return _last_satb_filtering_times_ms.average();
bb3f6194fedb 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
brutisso
parents: 6220
diff changeset
401 }
6219
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
402 };
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
403
922993931b3d 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause
brutisso
parents:
diff changeset
404 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP