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

G1: Remove unnecessary set_concurrency call in G1ConcurrentMark::weak_refs_work

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 18
    • 18
    • hotspot
    • gc
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: