G1: Remove unnecessary is-obj-dead check in HeapRegion::do_oops_on_memregion_in_humongous

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: 20
    • Component/s: hotspot
    • gc
    • b07

      In `HeapRegion::do_oops_on_memregion_in_humongous`, it contains an early-return for dead objs.

      ```
        if (sr->is_obj_dead(obj, pb)) {
          // The object is dead. There can be no other object in this region, so return
          // the end of that region.
          return end();
        }
      ```

      However, this condition is always false because an dead humongous obj means the whole region is reclaimed (becomes a free region) or reallocated (the objs must be live). Therefore, this check can be removed.

            Assignee:
            Albert Yang
            Reporter:
            Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: