< prev index next >

src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp

Print this page




 471   return young_gen()->eden_space()->tlab_capacity(thr);
 472 }
 473 
 474 size_t ParallelScavengeHeap::tlab_used(Thread* thr) const {
 475   return young_gen()->eden_space()->tlab_used(thr);
 476 }
 477 
 478 size_t ParallelScavengeHeap::unsafe_max_tlab_alloc(Thread* thr) const {
 479   return young_gen()->eden_space()->unsafe_max_tlab_alloc(thr);
 480 }
 481 
 482 HeapWord* ParallelScavengeHeap::allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) {
 483   HeapWord* result = young_gen()->allocate(requested_size);
 484   if (result != NULL) {
 485     *actual_size = requested_size;
 486   }
 487 
 488   return result;
 489 }
 490 
 491 void ParallelScavengeHeap::accumulate_statistics_all_tlabs() {
 492   CollectedHeap::accumulate_statistics_all_tlabs();
 493 }
 494 
 495 void ParallelScavengeHeap::resize_all_tlabs() {
 496   CollectedHeap::resize_all_tlabs();
 497 }
 498 
 499 // This method is used by System.gc() and JVMTI.
 500 void ParallelScavengeHeap::collect(GCCause::Cause cause) {
 501   assert(!Heap_lock->owned_by_self(),
 502     "this thread should not own the Heap_lock");
 503 
 504   uint gc_count      = 0;
 505   uint full_gc_count = 0;
 506   {
 507     MutexLocker ml(Heap_lock);
 508     // This value is guarded by the Heap_lock
 509     gc_count      = total_collections();
 510     full_gc_count = total_full_collections();
 511   }
 512 
 513   VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause);
 514   VMThread::execute(&op);




 471   return young_gen()->eden_space()->tlab_capacity(thr);
 472 }
 473 
 474 size_t ParallelScavengeHeap::tlab_used(Thread* thr) const {
 475   return young_gen()->eden_space()->tlab_used(thr);
 476 }
 477 
 478 size_t ParallelScavengeHeap::unsafe_max_tlab_alloc(Thread* thr) const {
 479   return young_gen()->eden_space()->unsafe_max_tlab_alloc(thr);
 480 }
 481 
 482 HeapWord* ParallelScavengeHeap::allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) {
 483   HeapWord* result = young_gen()->allocate(requested_size);
 484   if (result != NULL) {
 485     *actual_size = requested_size;
 486   }
 487 
 488   return result;
 489 }
 490 




 491 void ParallelScavengeHeap::resize_all_tlabs() {
 492   CollectedHeap::resize_all_tlabs();
 493 }
 494 
 495 // This method is used by System.gc() and JVMTI.
 496 void ParallelScavengeHeap::collect(GCCause::Cause cause) {
 497   assert(!Heap_lock->owned_by_self(),
 498     "this thread should not own the Heap_lock");
 499 
 500   uint gc_count      = 0;
 501   uint full_gc_count = 0;
 502   {
 503     MutexLocker ml(Heap_lock);
 504     // This value is guarded by the Heap_lock
 505     gc_count      = total_collections();
 506     full_gc_count = total_full_collections();
 507   }
 508 
 509   VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause);
 510   VMThread::execute(&op);


< prev index next >