CRR (XS): 7113006: G1: excessive ergo output when an evac failure happens

Jon Masamitsu jon.masamitsu at oracle.com
Wed Dec 28 15:16:12 UTC 2011


Tony,

Change looks fine.   Is it possible for a second thread to come in and take
the new region just created by the expand?

Not part of your change, but is this comment warranted?

>   601       // Even though the heap was expanded, it might not have reached
>   602       // the desired size. So, we cannot assume that the allocation
>   603       // will succeed.

I like comments but this one confused me a bit.  Where are we assuming
that the allocation will succeed?  Seems like we're just doing the necessary
thing by getting a region off the freelist.  Yes, the result might be 
null but
we still need to try and get a region.

Jon


On 12/28/2011 4:04 AM, Tony Printezis wrote:
> Hi all,
>
> Can I have a couple of code review for this very small change?
>
> http://cr.openjdk.java.net/~tonyp/7113006/webrev.0/
>
> The excessive ergo output was generated by repeated failed heap 
> expansion attempts during a GC. I slightly expanded (pun unintended!) 
> the scope of the CR to not only stop generating the ergo output after 
> the first failed heap expansion but also to not re-attempt the heap 
> expansion. If heap expansion fails once, it will probably fail again 
> so it's pointless to keep trying. Without doing a careful and in-depth 
> performance analysis I see a mild improvement in GC times when an 
> alloc failure happens with this fix.
>
> Tony
>



More information about the hotspot-gc-dev mailing list