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

G1: Remove loop in G1CollectedHeap::try_collect_fullgc

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • gc
    • b24

      The following check in `try_collect_fullgc` will always be true because either the result of `G1CollectedHeap::do_full_collection` (always `true`) is assigned to `_gc_succeeded` or it's "cancelled" by `_g1_periodic_collection`, which is NOT `is_explicit_full_gc`.


      ```
          if (!GCCause::is_explicit_full_gc(cause) || op.gc_succeeded()) {
            return op.gc_succeeded();
          }
      ```

      Therefore, there is no need having a loop here.

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

              Created:
              Updated:
              Resolved: