JDK-8177884 : Merge G1UpdateRSOrPushRefClosure with G1ParScanClosure
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2017-03-31
  • Updated: 2017-10-31
  • Resolved: 2017-10-31
Related Reports
Relates :  
Description
After JDK-8175554 it has become clear that the combination of G1UpdateRSOrPushRefClosure and G1ParPushRefClosure does almost exactly the same thing as G1ParScanClosure.

The only difference is that the latter need to update a flag whether it encountered a reference into the collection set during scanning a card. This extra write should be cheap.

Replacing G1UpdateRSOrPushRefClosure and G1ParPushRefClosure with G1ParScanClosure would remove a lot code.

Verify that there are no performance regressions by adding the flag to G1ParScanClosure and using it in place of the other two closures.
Comments
While testing performance impact of changes in JDK-8175554 we found that even the slightest additional thing done in these closures may impact performance. Particularly these two closures are called in different situations where different checks seem useful. Further in JDK-8175554 we implemented code sharing by use of common methods in a superclass. That is sufficient for now. Closing this as WNF.
31-10-2017