Mercurial > hg > graal-jvmci-8
annotate src/share/vm/services/memoryService.cpp @ 8826:338b3a9e29b5
Merge
author | stefank |
---|---|
date | Mon, 25 Mar 2013 11:00:19 +0100 |
parents | 8b4ce9870fd6 dbd5837b342f |
children | 42e370795a39 |
rev | line source |
---|---|
0 | 1 /* |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1089
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1089
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1089
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #include "precompiled.hpp" |
26 #include "classfile/systemDictionary.hpp" | |
27 #include "classfile/vmSymbols.hpp" | |
28 #include "gc_implementation/shared/mutableSpace.hpp" | |
29 #include "memory/collectorPolicy.hpp" | |
30 #include "memory/defNewGeneration.hpp" | |
31 #include "memory/genCollectedHeap.hpp" | |
32 #include "memory/generation.hpp" | |
33 #include "memory/generationSpec.hpp" | |
34 #include "memory/heap.hpp" | |
35 #include "memory/memRegion.hpp" | |
36 #include "memory/tenuredGeneration.hpp" | |
37 #include "oops/oop.inline.hpp" | |
38 #include "runtime/javaCalls.hpp" | |
39 #include "services/classLoadingService.hpp" | |
40 #include "services/lowMemoryDetector.hpp" | |
41 #include "services/management.hpp" | |
42 #include "services/memoryManager.hpp" | |
43 #include "services/memoryPool.hpp" | |
44 #include "services/memoryService.hpp" | |
45 #include "utilities/growableArray.hpp" | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
46 #include "utilities/macros.hpp" |
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
47 #if INCLUDE_ALL_GCS |
1972 | 48 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp" |
49 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" | |
50 #include "gc_implementation/parNew/parNewGeneration.hpp" | |
51 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" | |
52 #include "gc_implementation/parallelScavenge/psOldGen.hpp" | |
53 #include "gc_implementation/parallelScavenge/psYoungGen.hpp" | |
54 #include "services/g1MemoryPool.hpp" | |
55 #include "services/psMemoryPool.hpp" | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
56 #endif // INCLUDE_ALL_GCS |
0 | 57 |
58 GrowableArray<MemoryPool*>* MemoryService::_pools_list = | |
6197 | 59 new (ResourceObj::C_HEAP, mtInternal) GrowableArray<MemoryPool*>(init_pools_list_size, true); |
0 | 60 GrowableArray<MemoryManager*>* MemoryService::_managers_list = |
6197 | 61 new (ResourceObj::C_HEAP, mtInternal) GrowableArray<MemoryManager*>(init_managers_list_size, true); |
0 | 62 |
8825
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
63 GCMemoryManager* MemoryService::_minor_gc_manager = NULL; |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
64 GCMemoryManager* MemoryService::_major_gc_manager = NULL; |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
65 MemoryPool* MemoryService::_code_heap_pool = NULL; |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
66 MemoryPool* MemoryService::_metaspace_pool = NULL; |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
67 MemoryPool* MemoryService::_class_metaspace_pool = NULL; |
0 | 68 |
69 class GcThreadCountClosure: public ThreadClosure { | |
70 private: | |
71 int _count; | |
72 public: | |
73 GcThreadCountClosure() : _count(0) {}; | |
74 void do_thread(Thread* thread); | |
75 int count() { return _count; } | |
76 }; | |
77 | |
78 void GcThreadCountClosure::do_thread(Thread* thread) { | |
79 _count++; | |
80 } | |
81 | |
82 void MemoryService::set_universe_heap(CollectedHeap* heap) { | |
83 CollectedHeap::Name kind = heap->kind(); | |
84 switch (kind) { | |
85 case CollectedHeap::GenCollectedHeap : { | |
86 add_gen_collected_heap_info(GenCollectedHeap::heap()); | |
87 break; | |
88 } | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
89 #if INCLUDE_ALL_GCS |
0 | 90 case CollectedHeap::ParallelScavengeHeap : { |
91 add_parallel_scavenge_heap_info(ParallelScavengeHeap::heap()); | |
92 break; | |
93 } | |
342 | 94 case CollectedHeap::G1CollectedHeap : { |
1089
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
95 add_g1_heap_info(G1CollectedHeap::heap()); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
96 break; |
342 | 97 } |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
98 #endif // INCLUDE_ALL_GCS |
0 | 99 default: { |
342 | 100 guarantee(false, "Unrecognized kind of heap"); |
0 | 101 } |
102 } | |
103 | |
104 // set the GC thread count | |
105 GcThreadCountClosure gctcc; | |
106 heap->gc_threads_do(&gctcc); | |
107 int count = gctcc.count(); | |
108 if (count > 0) { | |
109 _minor_gc_manager->set_num_gc_threads(count); | |
110 _major_gc_manager->set_num_gc_threads(count); | |
111 } | |
112 | |
113 // All memory pools and memory managers are initialized. | |
114 // | |
115 _minor_gc_manager->initialize_gc_stat_info(); | |
116 _major_gc_manager->initialize_gc_stat_info(); | |
117 } | |
118 | |
119 // Add memory pools for GenCollectedHeap | |
120 // This function currently only supports two generations collected heap. | |
121 // The collector for GenCollectedHeap will have two memory managers. | |
122 void MemoryService::add_gen_collected_heap_info(GenCollectedHeap* heap) { | |
123 CollectorPolicy* policy = heap->collector_policy(); | |
124 | |
125 assert(policy->is_two_generation_policy(), "Only support two generations"); | |
126 guarantee(heap->n_gens() == 2, "Only support two-generation heap"); | |
127 | |
128 TwoGenerationCollectorPolicy* two_gen_policy = policy->as_two_generation_policy(); | |
129 if (two_gen_policy != NULL) { | |
130 GenerationSpec** specs = two_gen_policy->generations(); | |
131 Generation::Name kind = specs[0]->name(); | |
132 switch (kind) { | |
133 case Generation::DefNew: | |
134 _minor_gc_manager = MemoryManager::get_copy_memory_manager(); | |
135 break; | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
136 #if INCLUDE_ALL_GCS |
0 | 137 case Generation::ParNew: |
138 case Generation::ASParNew: | |
139 _minor_gc_manager = MemoryManager::get_parnew_memory_manager(); | |
140 break; | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
141 #endif // INCLUDE_ALL_GCS |
0 | 142 default: |
143 guarantee(false, "Unrecognized generation spec"); | |
144 break; | |
145 } | |
146 if (policy->is_mark_sweep_policy()) { | |
147 _major_gc_manager = MemoryManager::get_msc_memory_manager(); | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
148 #if INCLUDE_ALL_GCS |
0 | 149 } else if (policy->is_concurrent_mark_sweep_policy()) { |
150 _major_gc_manager = MemoryManager::get_cms_memory_manager(); | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
151 #endif // INCLUDE_ALL_GCS |
0 | 152 } else { |
153 guarantee(false, "Unknown two-gen policy"); | |
154 } | |
155 } else { | |
156 guarantee(false, "Non two-gen policy"); | |
157 } | |
158 _managers_list->append(_minor_gc_manager); | |
159 _managers_list->append(_major_gc_manager); | |
160 | |
161 add_generation_memory_pool(heap->get_gen(minor), _major_gc_manager, _minor_gc_manager); | |
162 add_generation_memory_pool(heap->get_gen(major), _major_gc_manager); | |
163 } | |
164 | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
165 #if INCLUDE_ALL_GCS |
0 | 166 // Add memory pools for ParallelScavengeHeap |
167 // This function currently only supports two generations collected heap. | |
168 // The collector for ParallelScavengeHeap will have two memory managers. | |
169 void MemoryService::add_parallel_scavenge_heap_info(ParallelScavengeHeap* heap) { | |
170 // Two managers to keep statistics about _minor_gc_manager and _major_gc_manager GC. | |
171 _minor_gc_manager = MemoryManager::get_psScavenge_memory_manager(); | |
172 _major_gc_manager = MemoryManager::get_psMarkSweep_memory_manager(); | |
173 _managers_list->append(_minor_gc_manager); | |
174 _managers_list->append(_major_gc_manager); | |
175 | |
176 add_psYoung_memory_pool(heap->young_gen(), _major_gc_manager, _minor_gc_manager); | |
177 add_psOld_memory_pool(heap->old_gen(), _major_gc_manager); | |
178 } | |
1089
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
179 |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
180 void MemoryService::add_g1_heap_info(G1CollectedHeap* g1h) { |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
181 assert(UseG1GC, "sanity"); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
182 |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
183 _minor_gc_manager = MemoryManager::get_g1YoungGen_memory_manager(); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
184 _major_gc_manager = MemoryManager::get_g1OldGen_memory_manager(); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
185 _managers_list->append(_minor_gc_manager); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
186 _managers_list->append(_major_gc_manager); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
187 |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
188 add_g1YoungGen_memory_pool(g1h, _major_gc_manager, _minor_gc_manager); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
189 add_g1OldGen_memory_pool(g1h, _major_gc_manager); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
190 } |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
191 #endif // INCLUDE_ALL_GCS |
0 | 192 |
193 MemoryPool* MemoryService::add_gen(Generation* gen, | |
194 const char* name, | |
195 bool is_heap, | |
196 bool support_usage_threshold) { | |
197 | |
198 MemoryPool::PoolType type = (is_heap ? MemoryPool::Heap : MemoryPool::NonHeap); | |
199 GenerationPool* pool = new GenerationPool(gen, name, type, support_usage_threshold); | |
200 _pools_list->append(pool); | |
201 return (MemoryPool*) pool; | |
202 } | |
203 | |
204 MemoryPool* MemoryService::add_space(ContiguousSpace* space, | |
205 const char* name, | |
206 bool is_heap, | |
207 size_t max_size, | |
208 bool support_usage_threshold) { | |
209 MemoryPool::PoolType type = (is_heap ? MemoryPool::Heap : MemoryPool::NonHeap); | |
210 ContiguousSpacePool* pool = new ContiguousSpacePool(space, name, type, max_size, support_usage_threshold); | |
211 | |
212 _pools_list->append(pool); | |
213 return (MemoryPool*) pool; | |
214 } | |
215 | |
216 MemoryPool* MemoryService::add_survivor_spaces(DefNewGeneration* gen, | |
217 const char* name, | |
218 bool is_heap, | |
219 size_t max_size, | |
220 bool support_usage_threshold) { | |
221 MemoryPool::PoolType type = (is_heap ? MemoryPool::Heap : MemoryPool::NonHeap); | |
222 SurvivorContiguousSpacePool* pool = new SurvivorContiguousSpacePool(gen, name, type, max_size, support_usage_threshold); | |
223 | |
224 _pools_list->append(pool); | |
225 return (MemoryPool*) pool; | |
226 } | |
227 | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
228 #if INCLUDE_ALL_GCS |
0 | 229 MemoryPool* MemoryService::add_cms_space(CompactibleFreeListSpace* space, |
230 const char* name, | |
231 bool is_heap, | |
232 size_t max_size, | |
233 bool support_usage_threshold) { | |
234 MemoryPool::PoolType type = (is_heap ? MemoryPool::Heap : MemoryPool::NonHeap); | |
235 CompactibleFreeListSpacePool* pool = new CompactibleFreeListSpacePool(space, name, type, max_size, support_usage_threshold); | |
236 _pools_list->append(pool); | |
237 return (MemoryPool*) pool; | |
238 } | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
239 #endif // INCLUDE_ALL_GCS |
0 | 240 |
241 // Add memory pool(s) for one generation | |
242 void MemoryService::add_generation_memory_pool(Generation* gen, | |
243 MemoryManager* major_mgr, | |
244 MemoryManager* minor_mgr) { | |
8761
8b4ce9870fd6
8009156: [parfait] Null pointer deference in hotspot/src/share/vm/services/memoryService.cpp
morris
parents:
8001
diff
changeset
|
245 guarantee(gen != NULL, "No generation for memory pool"); |
0 | 246 Generation::Name kind = gen->kind(); |
247 int index = _pools_list->length(); | |
248 | |
249 switch (kind) { | |
250 case Generation::DefNew: { | |
251 assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers"); | |
252 DefNewGeneration* young_gen = (DefNewGeneration*) gen; | |
253 // Add a memory pool for each space and young gen doesn't | |
254 // support low memory detection as it is expected to get filled up. | |
255 MemoryPool* eden = add_space(young_gen->eden(), | |
256 "Eden Space", | |
257 true, /* is_heap */ | |
258 young_gen->max_eden_size(), | |
259 false /* support_usage_threshold */); | |
260 MemoryPool* survivor = add_survivor_spaces(young_gen, | |
261 "Survivor Space", | |
262 true, /* is_heap */ | |
263 young_gen->max_survivor_size(), | |
264 false /* support_usage_threshold */); | |
265 break; | |
266 } | |
267 | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
268 #if INCLUDE_ALL_GCS |
0 | 269 case Generation::ParNew: |
270 case Generation::ASParNew: | |
271 { | |
272 assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers"); | |
273 // Add a memory pool for each space and young gen doesn't | |
274 // support low memory detection as it is expected to get filled up. | |
275 ParNewGeneration* parnew_gen = (ParNewGeneration*) gen; | |
276 MemoryPool* eden = add_space(parnew_gen->eden(), | |
277 "Par Eden Space", | |
278 true /* is_heap */, | |
279 parnew_gen->max_eden_size(), | |
280 false /* support_usage_threshold */); | |
281 MemoryPool* survivor = add_survivor_spaces(parnew_gen, | |
282 "Par Survivor Space", | |
283 true, /* is_heap */ | |
284 parnew_gen->max_survivor_size(), | |
285 false /* support_usage_threshold */); | |
286 | |
287 break; | |
288 } | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
289 #endif // INCLUDE_ALL_GCS |
0 | 290 |
291 case Generation::MarkSweepCompact: { | |
292 assert(major_mgr != NULL && minor_mgr == NULL, "Should have only one manager"); | |
293 add_gen(gen, | |
294 "Tenured Gen", | |
295 true, /* is_heap */ | |
296 true /* support_usage_threshold */); | |
297 break; | |
298 } | |
299 | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
300 #if INCLUDE_ALL_GCS |
0 | 301 case Generation::ConcurrentMarkSweep: |
302 case Generation::ASConcurrentMarkSweep: | |
303 { | |
304 assert(major_mgr != NULL && minor_mgr == NULL, "Should have only one manager"); | |
305 ConcurrentMarkSweepGeneration* cms = (ConcurrentMarkSweepGeneration*) gen; | |
306 MemoryPool* pool = add_cms_space(cms->cmsSpace(), | |
307 "CMS Old Gen", | |
308 true, /* is_heap */ | |
309 cms->reserved().byte_size(), | |
310 true /* support_usage_threshold */); | |
311 break; | |
312 } | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
313 #endif // INCLUDE_ALL_GCS |
0 | 314 |
315 default: | |
316 assert(false, "should not reach here"); | |
317 // no memory pool added for others | |
318 break; | |
319 } | |
320 | |
321 assert(major_mgr != NULL, "Should have at least one manager"); | |
322 // Link managers and the memory pools together | |
323 for (int i = index; i < _pools_list->length(); i++) { | |
324 MemoryPool* pool = _pools_list->at(i); | |
325 major_mgr->add_pool(pool); | |
326 if (minor_mgr != NULL) { | |
327 minor_mgr->add_pool(pool); | |
328 } | |
329 } | |
330 } | |
331 | |
332 | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
333 #if INCLUDE_ALL_GCS |
0 | 334 void MemoryService::add_psYoung_memory_pool(PSYoungGen* gen, MemoryManager* major_mgr, MemoryManager* minor_mgr) { |
335 assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers"); | |
336 | |
337 // Add a memory pool for each space and young gen doesn't | |
338 // support low memory detection as it is expected to get filled up. | |
339 EdenMutableSpacePool* eden = new EdenMutableSpacePool(gen, | |
340 gen->eden_space(), | |
341 "PS Eden Space", | |
342 MemoryPool::Heap, | |
343 false /* support_usage_threshold */); | |
344 | |
345 SurvivorMutableSpacePool* survivor = new SurvivorMutableSpacePool(gen, | |
346 "PS Survivor Space", | |
347 MemoryPool::Heap, | |
348 false /* support_usage_threshold */); | |
349 | |
350 major_mgr->add_pool(eden); | |
351 major_mgr->add_pool(survivor); | |
352 minor_mgr->add_pool(eden); | |
353 minor_mgr->add_pool(survivor); | |
354 _pools_list->append(eden); | |
355 _pools_list->append(survivor); | |
356 } | |
357 | |
358 void MemoryService::add_psOld_memory_pool(PSOldGen* gen, MemoryManager* mgr) { | |
359 PSGenerationPool* old_gen = new PSGenerationPool(gen, | |
360 "PS Old Gen", | |
361 MemoryPool::Heap, | |
362 true /* support_usage_threshold */); | |
363 mgr->add_pool(old_gen); | |
364 _pools_list->append(old_gen); | |
365 } | |
366 | |
1089
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
367 void MemoryService::add_g1YoungGen_memory_pool(G1CollectedHeap* g1h, |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
368 MemoryManager* major_mgr, |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
369 MemoryManager* minor_mgr) { |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
370 assert(major_mgr != NULL && minor_mgr != NULL, "should have two managers"); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
371 |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
372 G1EdenPool* eden = new G1EdenPool(g1h); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
373 G1SurvivorPool* survivor = new G1SurvivorPool(g1h); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
374 |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
375 major_mgr->add_pool(eden); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
376 major_mgr->add_pool(survivor); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
377 minor_mgr->add_pool(eden); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
378 minor_mgr->add_pool(survivor); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
379 _pools_list->append(eden); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
380 _pools_list->append(survivor); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
381 } |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
382 |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
383 void MemoryService::add_g1OldGen_memory_pool(G1CollectedHeap* g1h, |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
384 MemoryManager* mgr) { |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
385 assert(mgr != NULL, "should have one manager"); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
386 |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
387 G1OldGenPool* old_gen = new G1OldGenPool(g1h); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
388 mgr->add_pool(old_gen); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
389 _pools_list->append(old_gen); |
db0d5eba9d20
6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
tonyp
parents:
342
diff
changeset
|
390 } |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
391 #endif // INCLUDE_ALL_GCS |
0 | 392 |
393 void MemoryService::add_code_heap_memory_pool(CodeHeap* heap) { | |
394 _code_heap_pool = new CodeHeapPool(heap, | |
395 "Code Cache", | |
396 true /* support_usage_threshold */); | |
397 MemoryManager* mgr = MemoryManager::get_code_cache_memory_manager(); | |
398 mgr->add_pool(_code_heap_pool); | |
399 | |
400 _pools_list->append(_code_heap_pool); | |
401 _managers_list->append(mgr); | |
402 } | |
403 | |
8825
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
404 void MemoryService::add_metaspace_memory_pools() { |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
405 _metaspace_pool = new MetaspacePool(); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
406 _class_metaspace_pool = new ClassMetaspacePool(); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
407 |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
408 MemoryManager* mgr = MemoryManager::get_metaspace_memory_manager(); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
409 mgr->add_pool(_metaspace_pool); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
410 mgr->add_pool(_class_metaspace_pool); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
411 |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
412 _pools_list->append(_metaspace_pool); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
413 _pools_list->append(_class_metaspace_pool); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
414 _managers_list->append(mgr); |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
415 } |
dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
ehelin
parents:
8001
diff
changeset
|
416 |
0 | 417 MemoryManager* MemoryService::get_memory_manager(instanceHandle mh) { |
418 for (int i = 0; i < _managers_list->length(); i++) { | |
419 MemoryManager* mgr = _managers_list->at(i); | |
420 if (mgr->is_manager(mh)) { | |
421 return mgr; | |
422 } | |
423 } | |
424 return NULL; | |
425 } | |
426 | |
427 MemoryPool* MemoryService::get_memory_pool(instanceHandle ph) { | |
428 for (int i = 0; i < _pools_list->length(); i++) { | |
429 MemoryPool* pool = _pools_list->at(i); | |
430 if (pool->is_pool(ph)) { | |
431 return pool; | |
432 } | |
433 } | |
434 return NULL; | |
435 } | |
436 | |
437 void MemoryService::track_memory_usage() { | |
438 // Track the peak memory usage | |
439 for (int i = 0; i < _pools_list->length(); i++) { | |
440 MemoryPool* pool = _pools_list->at(i); | |
441 pool->record_peak_memory_usage(); | |
442 } | |
443 | |
444 // Detect low memory | |
445 LowMemoryDetector::detect_low_memory(); | |
446 } | |
447 | |
448 void MemoryService::track_memory_pool_usage(MemoryPool* pool) { | |
449 // Track the peak memory usage | |
450 pool->record_peak_memory_usage(); | |
451 | |
452 // Detect low memory | |
453 if (LowMemoryDetector::is_enabled(pool)) { | |
454 LowMemoryDetector::detect_low_memory(pool); | |
455 } | |
456 } | |
457 | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
458 void MemoryService::gc_begin(bool fullGC, bool recordGCBeginTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
459 bool recordAccumulatedGCTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
460 bool recordPreGCUsage, bool recordPeakUsage) { |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
461 |
0 | 462 GCMemoryManager* mgr; |
463 if (fullGC) { | |
464 mgr = _major_gc_manager; | |
465 } else { | |
466 mgr = _minor_gc_manager; | |
467 } | |
468 assert(mgr->is_gc_memory_manager(), "Sanity check"); | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
469 mgr->gc_begin(recordGCBeginTime, recordPreGCUsage, recordAccumulatedGCTime); |
0 | 470 |
471 // Track the peak memory usage when GC begins | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
472 if (recordPeakUsage) { |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
473 for (int i = 0; i < _pools_list->length(); i++) { |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
474 MemoryPool* pool = _pools_list->at(i); |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
475 pool->record_peak_memory_usage(); |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
476 } |
0 | 477 } |
478 } | |
479 | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
480 void MemoryService::gc_end(bool fullGC, bool recordPostGCUsage, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
481 bool recordAccumulatedGCTime, |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
482 bool recordGCEndTime, bool countCollection, |
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
483 GCCause::Cause cause) { |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
484 |
0 | 485 GCMemoryManager* mgr; |
486 if (fullGC) { | |
487 mgr = (GCMemoryManager*) _major_gc_manager; | |
488 } else { | |
489 mgr = (GCMemoryManager*) _minor_gc_manager; | |
490 } | |
491 assert(mgr->is_gc_memory_manager(), "Sanity check"); | |
492 | |
493 // register the GC end statistics and memory usage | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
494 mgr->gc_end(recordPostGCUsage, recordAccumulatedGCTime, recordGCEndTime, |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
495 countCollection, cause); |
0 | 496 } |
497 | |
498 void MemoryService::oops_do(OopClosure* f) { | |
499 int i; | |
500 | |
501 for (i = 0; i < _pools_list->length(); i++) { | |
502 MemoryPool* pool = _pools_list->at(i); | |
503 pool->oops_do(f); | |
504 } | |
505 for (i = 0; i < _managers_list->length(); i++) { | |
506 MemoryManager* mgr = _managers_list->at(i); | |
507 mgr->oops_do(f); | |
508 } | |
509 } | |
510 | |
511 bool MemoryService::set_verbose(bool verbose) { | |
512 MutexLocker m(Management_lock); | |
513 // verbose will be set to the previous value | |
514 bool succeed = CommandLineFlags::boolAtPut((char*)"PrintGC", &verbose, MANAGEMENT); | |
515 assert(succeed, "Setting PrintGC flag fails"); | |
516 ClassLoadingService::reset_trace_class_unloading(); | |
517 | |
518 return verbose; | |
519 } | |
520 | |
521 Handle MemoryService::create_MemoryUsage_obj(MemoryUsage usage, TRAPS) { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
522 Klass* k = Management::java_lang_management_MemoryUsage_klass(CHECK_NH); |
0 | 523 instanceKlassHandle ik(THREAD, k); |
524 | |
525 instanceHandle obj = ik->allocate_instance_handle(CHECK_NH); | |
526 | |
527 JavaValue result(T_VOID); | |
528 JavaCallArguments args(10); | |
529 args.push_oop(obj); // receiver | |
530 args.push_long(usage.init_size_as_jlong()); // Argument 1 | |
531 args.push_long(usage.used_as_jlong()); // Argument 2 | |
532 args.push_long(usage.committed_as_jlong()); // Argument 3 | |
533 args.push_long(usage.max_size_as_jlong()); // Argument 4 | |
534 | |
535 JavaCalls::call_special(&result, | |
536 ik, | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
537 vmSymbols::object_initializer_name(), |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
538 vmSymbols::long_long_long_long_void_signature(), |
0 | 539 &args, |
540 CHECK_NH); | |
541 return obj; | |
542 } | |
543 // | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
544 // GC manager type depends on the type of Generation. Depending on the space |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
545 // availablity and vm options the gc uses major gc manager or minor gc |
0 | 546 // manager or both. The type of gc manager depends on the generation kind. |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
547 // For DefNew, ParNew and ASParNew generation doing scavenge gc uses minor |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
548 // gc manager (so _fullGC is set to false ) and for other generation kinds |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
549 // doing mark-sweep-compact uses major gc manager (so _fullGC is set |
0 | 550 // to true). |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
551 TraceMemoryManagerStats::TraceMemoryManagerStats(Generation::Name kind, GCCause::Cause cause) { |
0 | 552 switch (kind) { |
553 case Generation::DefNew: | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
554 #if INCLUDE_ALL_GCS |
0 | 555 case Generation::ParNew: |
556 case Generation::ASParNew: | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
557 #endif // INCLUDE_ALL_GCS |
0 | 558 _fullGC=false; |
559 break; | |
560 case Generation::MarkSweepCompact: | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
561 #if INCLUDE_ALL_GCS |
0 | 562 case Generation::ConcurrentMarkSweep: |
563 case Generation::ASConcurrentMarkSweep: | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
6725
diff
changeset
|
564 #endif // INCLUDE_ALL_GCS |
0 | 565 _fullGC=true; |
566 break; | |
567 default: | |
568 assert(false, "Unrecognized gc generation kind."); | |
569 } | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
570 // this has to be called in a stop the world pause and represent |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
571 // an entire gc pause, start to finish: |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
572 initialize(_fullGC, cause,true, true, true, true, true, true, true); |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
573 } |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
574 TraceMemoryManagerStats::TraceMemoryManagerStats(bool fullGC, |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
575 GCCause::Cause cause, |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
576 bool recordGCBeginTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
577 bool recordPreGCUsage, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
578 bool recordPeakUsage, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
579 bool recordPostGCUsage, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
580 bool recordAccumulatedGCTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
581 bool recordGCEndTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
582 bool countCollection) { |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
583 initialize(fullGC, cause, recordGCBeginTime, recordPreGCUsage, recordPeakUsage, |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
584 recordPostGCUsage, recordAccumulatedGCTime, recordGCEndTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
585 countCollection); |
0 | 586 } |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
587 |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
588 // for a subclass to create then initialize an instance before invoking |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
589 // the MemoryService |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
590 void TraceMemoryManagerStats::initialize(bool fullGC, |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
591 GCCause::Cause cause, |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
592 bool recordGCBeginTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
593 bool recordPreGCUsage, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
594 bool recordPeakUsage, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
595 bool recordPostGCUsage, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
596 bool recordAccumulatedGCTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
597 bool recordGCEndTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
598 bool countCollection) { |
0 | 599 _fullGC = fullGC; |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
600 _recordGCBeginTime = recordGCBeginTime; |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
601 _recordPreGCUsage = recordPreGCUsage; |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
602 _recordPeakUsage = recordPeakUsage; |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
603 _recordPostGCUsage = recordPostGCUsage; |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
604 _recordAccumulatedGCTime = recordAccumulatedGCTime; |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
605 _recordGCEndTime = recordGCEndTime; |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
606 _countCollection = countCollection; |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
607 _cause = cause; |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
608 |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
609 MemoryService::gc_begin(_fullGC, _recordGCBeginTime, _recordAccumulatedGCTime, |
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
610 _recordPreGCUsage, _recordPeakUsage); |
0 | 611 } |
612 | |
613 TraceMemoryManagerStats::~TraceMemoryManagerStats() { | |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
614 MemoryService::gc_end(_fullGC, _recordPostGCUsage, _recordAccumulatedGCTime, |
3356
78542e2b5e35
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
fparain
parents:
2426
diff
changeset
|
615 _recordGCEndTime, _countCollection, _cause); |
0 | 616 } |
1703
f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
kevinw
parents:
1552
diff
changeset
|
617 |