Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp @ 18058:54bc75c144b0
Merge
author | asaha |
---|---|
date | Thu, 29 May 2014 13:14:25 -0700 |
parents | 78bbf4d43a14 |
children | 52b4284cb496 1f1d373cd044 |
comparison
equal
deleted
inserted
replaced
18055:1fa005fb28f5 | 18058:54bc75c144b0 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
371 // time spent in gc crosses a threshold, we will bail out. | 371 // time spent in gc crosses a threshold, we will bail out. |
372 loop_count++; | 372 loop_count++; |
373 if ((result == NULL) && (QueuedAllocationWarningCount > 0) && | 373 if ((result == NULL) && (QueuedAllocationWarningCount > 0) && |
374 (loop_count % QueuedAllocationWarningCount == 0)) { | 374 (loop_count % QueuedAllocationWarningCount == 0)) { |
375 warning("ParallelScavengeHeap::mem_allocate retries %d times \n\t" | 375 warning("ParallelScavengeHeap::mem_allocate retries %d times \n\t" |
376 " size=%d", loop_count, size); | 376 " size=" SIZE_FORMAT, loop_count, size); |
377 } | 377 } |
378 } | 378 } |
379 | 379 |
380 return result; | 380 return result; |
381 } | 381 } |
490 | 490 |
491 size_t ParallelScavengeHeap::tlab_capacity(Thread* thr) const { | 491 size_t ParallelScavengeHeap::tlab_capacity(Thread* thr) const { |
492 return young_gen()->eden_space()->tlab_capacity(thr); | 492 return young_gen()->eden_space()->tlab_capacity(thr); |
493 } | 493 } |
494 | 494 |
495 size_t ParallelScavengeHeap::tlab_used(Thread* thr) const { | |
496 return young_gen()->eden_space()->tlab_used(thr); | |
497 } | |
498 | |
495 size_t ParallelScavengeHeap::unsafe_max_tlab_alloc(Thread* thr) const { | 499 size_t ParallelScavengeHeap::unsafe_max_tlab_alloc(Thread* thr) const { |
496 return young_gen()->eden_space()->unsafe_max_tlab_alloc(thr); | 500 return young_gen()->eden_space()->unsafe_max_tlab_alloc(thr); |
497 } | 501 } |
498 | 502 |
499 HeapWord* ParallelScavengeHeap::allocate_new_tlab(size_t size) { | 503 HeapWord* ParallelScavengeHeap::allocate_new_tlab(size_t size) { |
663 } | 667 } |
664 } | 668 } |
665 | 669 |
666 void ParallelScavengeHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) { | 670 void ParallelScavengeHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) { |
667 const PSHeapSummary& heap_summary = create_ps_heap_summary(); | 671 const PSHeapSummary& heap_summary = create_ps_heap_summary(); |
672 gc_tracer->report_gc_heap_summary(when, heap_summary); | |
673 | |
668 const MetaspaceSummary& metaspace_summary = create_metaspace_summary(); | 674 const MetaspaceSummary& metaspace_summary = create_metaspace_summary(); |
669 gc_tracer->report_gc_heap_summary(when, heap_summary, metaspace_summary); | 675 gc_tracer->report_metaspace_summary(when, metaspace_summary); |
670 } | 676 } |
671 | 677 |
672 ParallelScavengeHeap* ParallelScavengeHeap::heap() { | 678 ParallelScavengeHeap* ParallelScavengeHeap::heap() { |
673 assert(_psh != NULL, "Uninitialized access to ParallelScavengeHeap::heap()"); | 679 assert(_psh != NULL, "Uninitialized access to ParallelScavengeHeap::heap()"); |
674 assert(_psh->kind() == CollectedHeap::ParallelScavengeHeap, "not a parallel scavenge heap"); | 680 assert(_psh->kind() == CollectedHeap::ParallelScavengeHeap, "not a parallel scavenge heap"); |