RFR 8067655: Clean up G1 remembered set oop iteration

Mikael Gerdin mikael.gerdin at oracle.com
Tue Dec 16 14:33:40 UTC 2014


Hi all,

while reading through the code which iterates over oops pointing into 
the collection set I noticed that the closure used to implement the 
iteration, G1ParPushHeapRSClosure, is hooked into the de-virtualization 
macros with oop_oop_iterate_nv but the static type is not preserved all 
the way down to the call site where oop_iterate is called, so the 
de-virtualization cannot work.

I fixed the code to pass down the correct type and while doing that I 
had to clean up some dead code, such as the FilterKind parameter to the 
HeapRegionDCTOC which was only ever used with the IntoCSFilterKind. The 
filtering is not needed at all since G1ParPushHeapRSClosure already does 
a collection set check so I removed the filtering altogether.

Bug: https://bugs.openjdk.java.net/browse/JDK-8067655
Webrev: http://cr.openjdk.java.net/~mgerdin/8067655/webrev.0/

Testing:
JPRT, jbb2005 on x86_64 and sparc.
The jbb runs showed no significant changes and the ScanRS time changes 
are inconclusive but I still think this is a nice cleanup change. At 
least this change makes it clear that it's actually only one closure 
type which is used by the HeapRegionDCTOC.

/Mikael


More information about the hotspot-gc-dev mailing list