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

Shenandoah: Avoid taking lock for disabled free set logging

XMLWordPrintable

    • gc
    • b05

        There are multiple places in Shenandoah where we take heap lock for potential free set diagnostics. There is no point in taking that lock if we do not report anything. We should at very least take the lock only when logging is actually needed.

        See instances like:

        ```
          {
            ShenandoahHeapLocker locker(heap->lock());
            heap->free_set()->log_status();
          }
        ```

              xpeng Xiaolong Peng
              shade Aleksey Shipilev
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: