461 return result;
462 }
463
464 void ParallelScavengeHeap::ensure_parsability(bool retire_tlabs) {
465 CollectedHeap::ensure_parsability(retire_tlabs);
466 young_gen()->eden_space()->ensure_parsability();
467 }
468
469 size_t ParallelScavengeHeap::tlab_capacity(Thread* thr) const {
470 return young_gen()->eden_space()->tlab_capacity(thr);
471 }
472
473 size_t ParallelScavengeHeap::tlab_used(Thread* thr) const {
474 return young_gen()->eden_space()->tlab_used(thr);
475 }
476
477 size_t ParallelScavengeHeap::unsafe_max_tlab_alloc(Thread* thr) const {
478 return young_gen()->eden_space()->unsafe_max_tlab_alloc(thr);
479 }
480
481 HeapWord* ParallelScavengeHeap::allocate_new_tlab(size_t minimal_size, size_t size, size_t* actual_size) {
482 HeapWord* result = young_gen()->allocate(size);
483 if (result != NULL) {
484 *actual_size = size;
485 }
486
487 return result;
488 }
489
490 void ParallelScavengeHeap::accumulate_statistics_all_tlabs() {
491 CollectedHeap::accumulate_statistics_all_tlabs();
492 }
493
494 void ParallelScavengeHeap::resize_all_tlabs() {
495 CollectedHeap::resize_all_tlabs();
496 }
497
498 // This method is used by System.gc() and JVMTI.
499 void ParallelScavengeHeap::collect(GCCause::Cause cause) {
500 assert(!Heap_lock->owned_by_self(),
501 "this thread should not own the Heap_lock");
502
503 uint gc_count = 0;
504 uint full_gc_count = 0;
|
461 return result;
462 }
463
464 void ParallelScavengeHeap::ensure_parsability(bool retire_tlabs) {
465 CollectedHeap::ensure_parsability(retire_tlabs);
466 young_gen()->eden_space()->ensure_parsability();
467 }
468
469 size_t ParallelScavengeHeap::tlab_capacity(Thread* thr) const {
470 return young_gen()->eden_space()->tlab_capacity(thr);
471 }
472
473 size_t ParallelScavengeHeap::tlab_used(Thread* thr) const {
474 return young_gen()->eden_space()->tlab_used(thr);
475 }
476
477 size_t ParallelScavengeHeap::unsafe_max_tlab_alloc(Thread* thr) const {
478 return young_gen()->eden_space()->unsafe_max_tlab_alloc(thr);
479 }
480
481 HeapWord* ParallelScavengeHeap::allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) {
482 HeapWord* result = young_gen()->allocate(requested_size);
483 if (result != NULL) {
484 *actual_size = requested_size;
485 }
486
487 return result;
488 }
489
490 void ParallelScavengeHeap::accumulate_statistics_all_tlabs() {
491 CollectedHeap::accumulate_statistics_all_tlabs();
492 }
493
494 void ParallelScavengeHeap::resize_all_tlabs() {
495 CollectedHeap::resize_all_tlabs();
496 }
497
498 // This method is used by System.gc() and JVMTI.
499 void ParallelScavengeHeap::collect(GCCause::Cause cause) {
500 assert(!Heap_lock->owned_by_self(),
501 "this thread should not own the Heap_lock");
502
503 uint gc_count = 0;
504 uint full_gc_count = 0;
|