Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8027746

Remove do_gen_barrier template parameter in G1ParCopyClosure

XMLWordPrintable

    • gc
    • b03

        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.

              tschatzl Thomas Schatzl
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: