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

Generational ZGC: Adjust the comment of ZHeuristics::use_per_cpu_shared_small_pages

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P5
    • 23
    • 22
    • hotspot
    • gc
    • b05

    Description

      The code in `ZHeuristics::use_per_cpu_shared_small_pages` doesn't match its comment.

      ```
      bool ZHeuristics::use_per_cpu_shared_small_pages() {
        // Use per-CPU shared small pages only if these pages occupy at most 3.125%
        // of the max heap size. Otherwise fall back to using a single shared small
        // page. This is useful when using small heaps on large machines.
        const size_t per_cpu_share = significant_heap_overhead() / ZCPU::count();
        return per_cpu_share >= ZPageSizeSmall;
      }
      ```

      From Kim's description, I revise the title.

      > The proposed change just reverts what appears to have been an intentional code
      change in JDK-8307058. That change should have updated the comment. So I
      don't think this change should be made. The comment should be fixed instead.

      Attachments

        Issue Links

          Activity

            People

              gli Guoxiong Li
              gli Guoxiong Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: