G1: Remove loop in G1CollectedHeap::try_collect_fullgc

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: