Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 4781:bacb651cf5bf
7113006: G1: excessive ergo output when an evac failure happens
Summary: Introduce a flag that is set when a heap expansion attempt during a GC fails so that we do not consantly attempt to expand the heap when it's going to fail anyway. This not only prevents the excessive ergo output (which is generated when a region allocation fails) but also avoids excessive and ultimately unsuccessful expansion attempts.
Reviewed-by: jmasa, johnc
author | tonyp |
---|---|
date | Thu, 05 Jan 2012 05:54:01 -0500 |
parents | 441e946dc1af |
children | 023652e49ac0 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Wed Jan 04 07:56:13 2012 -0800 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Thu Jan 05 05:54:01 2012 -0500 @@ -285,6 +285,14 @@ // Typically, it is not full so we should re-use it during the next GC. HeapRegion* _retained_old_gc_alloc_region; + // It specifies whether we should attempt to expand the heap after a + // region allocation failure. If heap expansion fails we set this to + // false so that we don't re-attempt the heap expansion (it's likely + // that subsequent expansion attempts will also fail if one fails). + // Currently, it is only consulted during GC and it's reset at the + // start of each GC. + bool _expand_heap_after_alloc_failure; + // It resets the mutator alloc region before new allocations can take place. void init_mutator_alloc_region();