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

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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • gc
    • b07

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: