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

G1: Remove unnecessary set_concurrency call in G1ConcurrentMark::weak_refs_work

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b25

      Description

      ```
      G1ConcurrentMark::weak_refs_work(...) {
        ...
        set_concurrency(active_workers);
        ...

        rp->process_discovered_references(...)
      }
      ```

      `set_concurrency` is there to ensure proper termination logic, `TaskTerminator::offer_termination` needs to know how many workers are actually launched. However, Ref-processing is divided into several steps internally, and each step may launch different number of workers. The correct number of workers is actually set in `prepare_run_task_hook`. Therefore, the `set_concurrency` call inside `weak_refs_work` is not needed.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: