RFR(XXS): G1: Duplicated code in G1UpdateRSOrPushRefOopClosure::do_oop_nv()

Bengt Rutisson bengt.rutisson at oracle.com
Mon Jul 16 08:37:45 UTC 2012



John,

Looks good!

Bengt


On 2012-07-05 21:24, John Cuthbertson wrote:
> Hi Everyone,
>
> Can I have a couple of volunteers to review this very small change? 
> The webrev can be found at: 
> http://cr.openjdk.java.net/~johnc/7173712/webrev.0/
>
> Summary:
> While looking at some collect profiles in analyzer with an engineer in 
> the JVM performance team, we noticed a high amount of CPU time being 
> spent in code inlined into G1UpdateRSOrPushRefOopClosure::do_oop_nv(). 
> Examination of this code proved that it was code from  
> G1RemSet::par_write_ref() - specifically it was code that was fetching 
> the HeapRegion for the object and checking for a cross-region 
> reference. This code also existed (and was executed) in the 
> G1UpdateRSOrPushRefOopClosure::do_oop_nv(). So effectively we were 
> executing some duplicated code unnecessarily. The solution was to 
> refactor the code for G1UpdateRSOrPushRefOopClosure::do_oop_nv() 
> slightly and manually inline the important call from 
> G1RemSet::par_write_ref() - eliminating executing the replicated code.
>
> Testing:
> Collect profiles in analyzer, the GC test suite, and jprt.
>
> Thanks,
>
> JohnC





More information about the hotspot-gc-dev mailing list