The do_gen_barrier template parameter is set to false in all closures that are used in G1. Further, the code added by this template parameter in G1ParCopyClosure::do_oop_work is conceptually flawed anyway: it calls ParScanClosure::par_do_barrier(), which does not work in G1. In particular, it uses OopsInGenClosure::gen_boundary() which cannot be used in G1. Also remove the G1ParScanAndMarkClosure typedef which is the only one that sets this do_gen_barrier template parameter to true, but is otherwise unreferenced. I also think OopsInHeapRegionClosure should inherit from ExtendedOopClosure, not OopsInGenClosure, as G1 does not have such a simple view on generations as other collectors (i.e. a simple address boundary). This would also decrease memory footprint of closures, possibly increasing locality of access of other members that are actually accessed in the oop closures.
|