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

Remove dead code in G1CopyingKeepAliveClosure

XMLWordPrintable

    • gc
    • b04

      There is the following code in G1CopyingKeepAliveClosure::do_oop_work:

          if (_g1h->is_in_cset_or_humongous(obj)) {
      [...]
            if (_g1h->is_in_g1_reserved(p)) {
              _par_scan_state->push_on_queue(p);
            } else {
              assert(!Metaspace::contains((const void*)p),
                     "Unexpectedly found a pointer from metadata: " PTR_FORMAT, p2i(p));
              _copy_non_heap_obj_cl->do_oop(p);
            }
          }

      is_in_cset_or_humongous() implies is_in_g1_reserved(), so the condition and the else-part can be removed.

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

              Created:
              Updated:
              Resolved: