RFR (XS): 8207953: Remove dead code in G1CopyingKeepAliveClosure

Thomas Schatzl thomas.schatzl at oracle.com
Fri Jul 20 09:58:30 UTC 2018


Hi all,

  can I have a review for this trivial change that removes dead code:

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.

CR:
https://bugs.openjdk.java.net/browse/JDK-8207953
Webrev:
http://cr.openjdk.java.net/~tschatzl/8207953/webrev/
Testing:
hs-tier1

Thanks,
  Thomas




More information about the hotspot-gc-dev mailing list