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

C1/C2-only modes use 2 compiler threads on low CPU count machines

XMLWordPrintable

      There is an unfortunate limitation with default tiered policy that we would have at least 2 threads on 1 CPU machine: 1 thread for C1, and 1 thread for C2.

      But if we select C1-only or C2-only modes, we _also_ get 2 compiler threads, for which we have no good reason. These threads would just step on each other toes.

      $ build/linux-x86_64-server-release/images/jdk/bin/java -XX:-TieredCompilation -XX:ActiveProcessorCount=1 -XX:+PrintFlagsFinal 2>&1 | grep CICompilerCount
           intx CICompilerCount = 2 {product} {ergonomic}
           bool CICompilerCountPerCPU = true {product} {default}

      $ build/linux-x86_64-server-release/images/jdk/bin/java -XX:TieredStopAtLevel=1 -XX:ActiveProcessorCount=1 -XX:+PrintFlagsFinal 2>&1 | grep CICompilerCount
           intx CICompilerCount = 2 {product} {ergonomic}
           bool CICompilerCountPerCPU = true {product} {default}

      It is a minor bug in `CompilationPolicy::initialize`, but it gets in the way studying Leyden in tight CPU scenarios.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: