comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 8853:2e093b564241

7014552: gc/lock/jni/jnilockXXX works too slow on 1-processor machine Summary: Keep a counter of how many times we were stalled by the GC locker, add a diagnostic flag which sets the limit. Reviewed-by: brutisso, ehelin, johnc
author mgerdin
date Thu, 28 Mar 2013 10:27:28 +0100
parents ad747ee9d0b1
children b9a918201d47 7b835924c31c
comparison
equal deleted inserted replaced
8827:42e370795a39 8853:2e093b564241
557 557
558 // First-level mutator allocation attempt: try to allocate out of 558 // First-level mutator allocation attempt: try to allocate out of
559 // the mutator alloc region without taking the Heap_lock. This 559 // the mutator alloc region without taking the Heap_lock. This
560 // should only be used for non-humongous allocations. 560 // should only be used for non-humongous allocations.
561 inline HeapWord* attempt_allocation(size_t word_size, 561 inline HeapWord* attempt_allocation(size_t word_size,
562 unsigned int* gc_count_before_ret); 562 unsigned int* gc_count_before_ret,
563 int* gclocker_retry_count_ret);
563 564
564 // Second-level mutator allocation attempt: take the Heap_lock and 565 // Second-level mutator allocation attempt: take the Heap_lock and
565 // retry the allocation attempt, potentially scheduling a GC 566 // retry the allocation attempt, potentially scheduling a GC
566 // pause. This should only be used for non-humongous allocations. 567 // pause. This should only be used for non-humongous allocations.
567 HeapWord* attempt_allocation_slow(size_t word_size, 568 HeapWord* attempt_allocation_slow(size_t word_size,
568 unsigned int* gc_count_before_ret); 569 unsigned int* gc_count_before_ret,
570 int* gclocker_retry_count_ret);
569 571
570 // Takes the Heap_lock and attempts a humongous allocation. It can 572 // Takes the Heap_lock and attempts a humongous allocation. It can
571 // potentially schedule a GC pause. 573 // potentially schedule a GC pause.
572 HeapWord* attempt_allocation_humongous(size_t word_size, 574 HeapWord* attempt_allocation_humongous(size_t word_size,
573 unsigned int* gc_count_before_ret); 575 unsigned int* gc_count_before_ret,
576 int* gclocker_retry_count_ret);
574 577
575 // Allocation attempt that should be called during safepoints (e.g., 578 // Allocation attempt that should be called during safepoints (e.g.,
576 // at the end of a successful GC). expect_null_mutator_alloc_region 579 // at the end of a successful GC). expect_null_mutator_alloc_region
577 // specifies whether the mutator alloc region is expected to be NULL 580 // specifies whether the mutator alloc region is expected to be NULL
578 // or not. 581 // or not.