RFR (S): 8201490: Improve concurrent mark keep alive closure performance

Kim Barrett kim.barrett at oracle.com
Thu Apr 12 21:28:28 UTC 2018


> On Apr 12, 2018, at 3:57 PM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> 
> Hi,
> 
>  can I have reviews for this change that improves the performance of
> the G1CMKeepAliveAndDrainClosure used for reference processing in some
> (sometimes common) special case?
> 
> This particular change makes sure that the actual marking will not be
> called for NULL referents in the keep-alive closure, and do not count
> against the threshold that starts marking, so that marking will not
> start without actual work.
> 
> Setup/teardown of G1 marking is very big.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8201490
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8201490/webrev
> Testing:
> hs-tier1-3
> 
> Thanks,
>  Thomas

Looks good.  Just a couple minor comments.

------------------------------------------------------------------------------ 
src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
 782   // Returns whether there has been a mark to the bitmap.
 788   // Returns true if the reference caused a mark to be set in the next bitmap.

Consider making these the same, and something like:
Returns true if a mark was added to the bitmap.

------------------------------------------------------------------------------
src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp
 243   if (obj == NULL) {
 244     return false;
 245   }
 246   return make_reference_grey(obj);

For me, something like the following would be easier to read:

  return (obj != NULL) && make_reference_grey(obj)

Up to you...

------------------------------------------------------------------------------



More information about the hotspot-gc-dev mailing list