[9] RFR(S): 8162881: Effect of -XX:CICompilerCount depends on ordering of other flags
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Aug 3 15:17:02 UTC 2016
Okay.
Thanks,
Vladimir
On 8/3/16 5:36 AM, Tobias Hartmann wrote:
> Hi,
>
> RBT testing found some problems with the WB_IsIntrinsicAvailable method. With TieredStopAtLevel=1, we now don't create the C2 compiler threads anymore but WB_IsIntrinsicAvailable expects 'CompileBroker::compiler(compLevel)' to be non-null. I fixed the method to check for TieredStopAtLevel and also added the corresponding check to the tests.
>
> New webrev:
> http://cr.openjdk.java.net/~thartmann/8162881/webrev.01/
>
> I verified that the failing tests pass and re-submitted RBT (still running).
>
> Thanks,
> Tobias
>
> On 03.08.2016 08:58, Tobias Hartmann wrote:
>> Thanks, Vladimir!
>>
>> Best regards,
>> Tobias
>>
>> On 02.08.2016 23:46, Vladimir Kozlov wrote:
>>> Thank you for fixing this, Tobias
>>>
>>> Changes looks good.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 8/2/16 5:30 AM, Tobias Hartmann wrote:
>>>> Hi,
>>>>
>>>> please review the following patch:
>>>> https://bugs.openjdk.java.net/browse/JDK-8162881
>>>> http://cr.openjdk.java.net/~thartmann/8162881/webrev.00/
>>>>
>>>> There are multiple problems and inconsistencies with the CICompilerCount flag:
>>>>
>>>> 1) We can not set the number of compiler threads to 1 if -TieredCompilation is specified after CICompilerCount=1:
>>>> $ java -XX:CICompilerCount=1 -XX:-TieredCompilation -version
>>>> CICompilerCount (1) must be at least 2
>>>> Improperly specified VM option 'CICompilerCount=1'
>>>> Error: Could not create the Java Virtual Machine.
>>>> Error: A fatal exception has occurred. Program will exit.
>>>>
>>>> 2) We can not set the number of compiler threads to 1 if TieredStopAtLevel=1 is specified after CICompilerCount=1:
>>>> $ java -XX:CICompilerCount=1 -XX:-TieredStopAtLevel=1 -XX:+PrintFlagsFinal -version
>>>> CICompilerCount (1) must be at least 2
>>>> Improperly specified VM option 'CICompilerCount=1'
>>>> Error: Could not create the Java Virtual Machine.
>>>> Error: A fatal exception has occurred. Program will exit.
>>>>
>>>> 3) The number of compiler counts can be set to 1 with TieredStopAtLevel=1 but has no effect:
>>>> $ java -XX:TieredStopAtLevel=1 -XX:CICompilerCount=1 -XX:+PrintFlagsFinal -version | grep CICompilerCount
>>>> intx CICompilerCount = 2 {product} {command line, ergonomic}
>>>>
>>>> 4) The value of CICompilerCount is listed as being "ergonomic" although it was set via command line:
>>>> $ java -XX:TieredStopAtLevel=1 -XX:CICompilerCount=5 -XX:+PrintFlagsFinal -version | grep CICompilerCount
>>>> intx CICompilerCount = 5 {product} {command line, ergonomic}
>>>>
>>>> To fix 1) and 2), I changed the ConstraintType of the CICompilerCount constraint to 'AfterErgo'. Like this, the value of CICompilerCount is only checked after the effect of -XX:-TieredCompilation took place.
>>>>
>>>> To fix 3), I added special cases to the initialization of SimpleThresholdPolicy and AdvancedThresholdPolicy to set the C2 compiler count to zero if TieredStopAtLevel < CompLevel_full_optimization.
>>>>
>>>> To fix 4), I changed the ergonomics code to only use FLAG_SET_ERGO if the value of CICompilerCount is updated. I also changed the computation of 'count' to always be >= 2 because with os::active_processor_count() == 1, count is ergonomically set to 1 but both c1_count and c2_count are set to 2. I added an assert to check for consistency.
>>>>
>>>> I added the corresponding test cases to CheckCICompilerCount.
>>>>
>>>> Tested with regression test, JPRT and RBT (running).
>>>>
>>>> Thanks,
>>>> Tobias
>>>>
More information about the hotspot-compiler-dev
mailing list