Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.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 | c9814fadeb38 |
children | b9a918201d47 d55c004e1d4d |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Wed Mar 27 10:55:37 2013 +0100 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Thu Mar 28 10:27:28 2013 +0100 @@ -60,7 +60,8 @@ inline HeapWord* G1CollectedHeap::attempt_allocation(size_t word_size, - unsigned int* gc_count_before_ret) { + unsigned int* gc_count_before_ret, + int* gclocker_retry_count_ret) { assert_heap_not_locked_and_not_at_safepoint(); assert(!isHumongous(word_size), "attempt_allocation() should not " "be called for humongous allocation requests"); @@ -68,7 +69,9 @@ HeapWord* result = _mutator_alloc_region.attempt_allocation(word_size, false /* bot_updates */); if (result == NULL) { - result = attempt_allocation_slow(word_size, gc_count_before_ret); + result = attempt_allocation_slow(word_size, + gc_count_before_ret, + gclocker_retry_count_ret); } assert_heap_not_locked(); if (result != NULL) {