Mercurial > hg > graal-compiler
comparison src/share/vm/memory/heapInspection.cpp @ 628:7bb995fbd3c0
Merge
author | trims |
---|---|
date | Thu, 12 Mar 2009 18:16:36 -0700 |
parents | 0fbdb4381b99 c6c601a0f2d6 |
children | cff162798819 |
comparison
equal
deleted
inserted
replaced
580:ce2272390558 | 628:7bb995fbd3c0 |
---|---|
231 } | 231 } |
232 | 232 |
233 size_t missed_count() { return _missed_count; } | 233 size_t missed_count() { return _missed_count; } |
234 }; | 234 }; |
235 | 235 |
236 void HeapInspection::heap_inspection(outputStream* st) { | 236 void HeapInspection::heap_inspection(outputStream* st, bool need_prologue) { |
237 ResourceMark rm; | 237 ResourceMark rm; |
238 HeapWord* ref; | 238 HeapWord* ref; |
239 | 239 |
240 CollectedHeap* heap = Universe::heap(); | 240 CollectedHeap* heap = Universe::heap(); |
241 bool is_shared_heap = false; | 241 bool is_shared_heap = false; |
242 switch (heap->kind()) { | 242 switch (heap->kind()) { |
243 case CollectedHeap::G1CollectedHeap: | 243 case CollectedHeap::G1CollectedHeap: |
244 case CollectedHeap::GenCollectedHeap: { | 244 case CollectedHeap::GenCollectedHeap: { |
245 is_shared_heap = true; | 245 is_shared_heap = true; |
246 SharedHeap* sh = (SharedHeap*)heap; | 246 SharedHeap* sh = (SharedHeap*)heap; |
247 sh->gc_prologue(false /* !full */); // get any necessary locks, etc. | 247 if (need_prologue) { |
248 sh->gc_prologue(false /* !full */); // get any necessary locks, etc. | |
249 } | |
248 ref = sh->perm_gen()->used_region().start(); | 250 ref = sh->perm_gen()->used_region().start(); |
249 break; | 251 break; |
250 } | 252 } |
251 #ifndef SERIALGC | 253 #ifndef SERIALGC |
252 case CollectedHeap::ParallelScavengeHeap: { | 254 case CollectedHeap::ParallelScavengeHeap: { |
288 } else { | 290 } else { |
289 st->print_cr("WARNING: Ran out of C-heap; histogram not generated"); | 291 st->print_cr("WARNING: Ran out of C-heap; histogram not generated"); |
290 } | 292 } |
291 st->flush(); | 293 st->flush(); |
292 | 294 |
293 if (is_shared_heap) { | 295 if (need_prologue && is_shared_heap) { |
294 SharedHeap* sh = (SharedHeap*)heap; | 296 SharedHeap* sh = (SharedHeap*)heap; |
295 sh->gc_epilogue(false /* !full */); // release all acquired locks, etc. | 297 sh->gc_epilogue(false /* !full */); // release all acquired locks, etc. |
296 } | 298 } |
297 } | 299 } |
298 | 300 |