Swap conditions order in PSScavengeCLDOopClosure::do_oop(oop*)

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: None
    • Component/s: hotspot
    • gc
    • b16

      The current condition is:

      if (PSScavenge::is_obj_in_young(new_obj) && !_has_oops_into_young_gen) {

      As noted during the review of JDK-8367347, if we swap the order we'll have the trivial check first. This could be easier for readers and the branch predictor.

            Assignee:
            Francesco Andreuzzi
            Reporter:
            Francesco Andreuzzi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: