annotate src/share/vm/gc_implementation/g1/g1MonitoringSupport.cpp @ 3777:e8b0b0392037

7046182: G1: remove unnecessary iterations over the collection set Summary: Remove two unnecessary iterations over the collection set which are supposed to prepare the RSet's of the CSet regions for parallel iterations (we'll make sure this is done incrementally). I'll piggyback on this CR the removal of the G1_REM_SET_LOGGING code. Reviewed-by: brutisso, johnc
author tonyp
date Tue, 21 Jun 2011 15:23:07 -0400
parents b52782ae3880
children 8229bd737950
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3289
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
1 /*
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
4 *
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
7 * published by the Free Software Foundation.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
8 *
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
13 * accompanied this code).
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
14 *
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
18 *
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
21 * questions.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
22 *
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
23 */
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
24
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
25 #include "precompiled.hpp"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
26 #include "gc_implementation/g1/g1MonitoringSupport.hpp"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
27 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
28 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
29
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
30 G1MonitoringSupport::G1MonitoringSupport(G1CollectedHeap* g1h,
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
31 VirtualSpace* g1_storage_addr) :
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
32 _g1h(g1h),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
33 _incremental_collection_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
34 _full_collection_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
35 _non_young_collection_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
36 _old_space_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
37 _young_collection_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
38 _eden_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
39 _from_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
40 _to_counters(NULL),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
41 _g1_storage_addr(g1_storage_addr)
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
42 {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
43 // Counters for GC collections
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
44 //
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
45 // name "collector.0". In a generational collector this would be the
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
46 // young generation collection.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
47 _incremental_collection_counters =
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
48 new CollectorCounters("G1 incremental collections", 0);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
49 // name "collector.1". In a generational collector this would be the
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
50 // old generation collection.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
51 _full_collection_counters =
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
52 new CollectorCounters("G1 stop-the-world full collections", 1);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
53
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
54 // timer sampling for all counters supporting sampling only update the
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
55 // used value. See the take_sample() method. G1 requires both used and
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
56 // capacity updated so sampling is not currently used. It might
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
57 // be sufficient to update all counters in take_sample() even though
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
58 // take_sample() only returns "used". When sampling was used, there
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
59 // were some anomolous values emitted which may have been the consequence
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
60 // of not updating all values simultaneously (i.e., see the calculation done
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
61 // in eden_space_used(), is it possbile that the values used to
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
62 // calculate either eden_used or survivor_used are being updated by
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
63 // the collector when the sample is being done?).
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
64 const bool sampled = false;
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
65
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
66 // "Generation" and "Space" counters.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
67 //
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
68 // name "generation.1" This is logically the old generation in
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
69 // generational GC terms. The "1, 1" parameters are for
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
70 // the n-th generation (=1) with 1 space.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
71 // Counters are created from minCapacity, maxCapacity, and capacity
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
72 _non_young_collection_counters =
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
73 new GenerationCounters("whole heap", 1, 1, _g1_storage_addr);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
74
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
75 // name "generation.1.space.0"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
76 // Counters are created from maxCapacity, capacity, initCapacity,
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
77 // and used.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
78 _old_space_counters = new HSpaceCounters("space", 0,
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
79 _g1h->max_capacity(), _g1h->capacity(), _non_young_collection_counters);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
80
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
81 // Young collection set
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
82 // name "generation.0". This is logically the young generation.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
83 // The "0, 3" are paremeters for the n-th genertaion (=0) with 3 spaces.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
84 // See _non_young_collection_counters for additional counters
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
85 _young_collection_counters = new GenerationCounters("young", 0, 3, NULL);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
86
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
87 // Replace "max_heap_byte_size() with maximum young gen size for
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
88 // g1Collectedheap
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
89 // name "generation.0.space.0"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
90 // See _old_space_counters for additional counters
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
91 _eden_counters = new HSpaceCounters("eden", 0,
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
92 _g1h->max_capacity(), eden_space_committed(),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
93 _young_collection_counters);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
94
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
95 // name "generation.0.space.1"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
96 // See _old_space_counters for additional counters
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
97 // Set the arguments to indicate that this survivor space is not used.
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
98 _from_counters = new HSpaceCounters("s0", 1, (long) 0, (long) 0,
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
99 _young_collection_counters);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
100
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
101 // name "generation.0.space.2"
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
102 // See _old_space_counters for additional counters
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
103 _to_counters = new HSpaceCounters("s1", 2,
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
104 _g1h->max_capacity(),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
105 survivor_space_committed(),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
106 _young_collection_counters);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
107 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
108
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
109 size_t G1MonitoringSupport::overall_committed() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
110 return g1h()->capacity();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
111 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
112
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
113 size_t G1MonitoringSupport::overall_used() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
114 return g1h()->used_unlocked();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
115 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
116
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
117 size_t G1MonitoringSupport::eden_space_committed() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
118 return MAX2(eden_space_used(), (size_t) HeapRegion::GrainBytes);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
119 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
120
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
121 size_t G1MonitoringSupport::eden_space_used() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
122 size_t young_list_length = g1h()->young_list()->length();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
123 size_t eden_used = young_list_length * HeapRegion::GrainBytes;
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
124 size_t survivor_used = survivor_space_used();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
125 eden_used = subtract_up_to_zero(eden_used, survivor_used);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
126 return eden_used;
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
127 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
128
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
129 size_t G1MonitoringSupport::survivor_space_committed() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
130 return MAX2(survivor_space_used(),
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
131 (size_t) HeapRegion::GrainBytes);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
132 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
133
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
134 size_t G1MonitoringSupport::survivor_space_used() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
135 size_t survivor_num = g1h()->g1_policy()->recorded_survivor_regions();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
136 size_t survivor_used = survivor_num * HeapRegion::GrainBytes;
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
137 return survivor_used;
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
138 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
139
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
140 size_t G1MonitoringSupport::old_space_committed() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
141 size_t committed = overall_committed();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
142 size_t eden_committed = eden_space_committed();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
143 size_t survivor_committed = survivor_space_committed();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
144 committed = subtract_up_to_zero(committed, eden_committed);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
145 committed = subtract_up_to_zero(committed, survivor_committed);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
146 committed = MAX2(committed, (size_t) HeapRegion::GrainBytes);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
147 return committed;
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
148 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
149
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
150 // See the comment near the top of g1MonitoringSupport.hpp for
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
151 // an explanation of these calculations for "used" and "capacity".
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
152 size_t G1MonitoringSupport::old_space_used() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
153 size_t used = overall_used();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
154 size_t eden_used = eden_space_used();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
155 size_t survivor_used = survivor_space_used();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
156 used = subtract_up_to_zero(used, eden_used);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
157 used = subtract_up_to_zero(used, survivor_used);
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
158 return used;
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
159 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
160
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
161 void G1MonitoringSupport::update_counters() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
162 if (UsePerfData) {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
163 eden_counters()->update_capacity(eden_space_committed());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
164 eden_counters()->update_used(eden_space_used());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
165 to_counters()->update_capacity(survivor_space_committed());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
166 to_counters()->update_used(survivor_space_used());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
167 old_space_counters()->update_capacity(old_space_committed());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
168 old_space_counters()->update_used(old_space_used());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
169 non_young_collection_counters()->update_all();
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
170 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
171 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
172
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
173 void G1MonitoringSupport::update_eden_counters() {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
174 if (UsePerfData) {
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
175 eden_counters()->update_capacity(eden_space_committed());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
176 eden_counters()->update_used(eden_space_used());
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
177 }
b52782ae3880 6946417: G1: Java VisualVM does not support G1 properly.
jmasa
parents:
diff changeset
178 }