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

G1 makes two concurrent refinement threads with -XX:G1ConcRefinementThreads=1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • gc

      This simplest way to demonstrate this is to run:

      $ java -XX:G1ConcRefinementThreads=1 -XX:+UnlockDiagnosticVMOptions -XX:+G1TraceConcRefinement Hello
      G1-Refine-stop
      G1-Refine-stop

      Those two lines correspond to two separate threads coming to ConcurrentG1RefineThread::stop. I understand this is because of:

        // We need one extra thread to do the young gen rset size sampling.
        _n_threads = _n_worker_threads + 1;

      ...but this is not what user supplied for the number of refinement threads. This is at very least confusing, and potentially complicates GC fine-tuning.

            drwhite Derek White
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: