RFR(S): 7026932: G1: No need to abort VM when card count cache expansion fails
Igor Veresov
igor.veresov at oracle.com
Tue Mar 15 18:29:11 UTC 2011
This looks good!
igor
On 3/15/11 10:13 AM, John Cuthbertson wrote:
> Hi Everyone,
>
> Can I have a couple of volunteers to review the changes for this CR? The
> webrev can be found at: http://cr.openjdk.java.net/~johnc/7026932/webrev.0/
>
> The problem here was that the allocation that is used to expand some
> side tables associated with the hot card cache failed and the JVM
> aborted with an out of C heap memory. For these particular tables an
> expansion is requested when the number of cards hashed to a location in
> these tables goes over a threshold. But it's not critical that the
> expansion succeeds - continuing with the smaller tables is reasonable
> (with perhaps a small performance penalty caused be doing slightly more
> refinement).
>
> The code that does these allocations uses NEW_C_HEAP_ARRAY which calls
> AllocateHeap. AllocateHeap calls os::malloc() followed by
> vm_exit_out_of_memory if the malloc fails. The solution is to call the C
> heap allocation routines directly and perform localized error handling.
>
> I have also added a flag that limits the size to which these table can
> expand to as a fraction of the number of cards for the maximum Java heap
> capacity.
>
> Testing: code modification to simulate out of C heap conditions, the GC
> test suite with expansion artifically disabled; the GC test suite with
> expansion enabled; jprt.
>
> Regards,
>
> JohnC
More information about the hotspot-gc-dev
mailing list