RFR(XXS): 8034775: Failing to initialize VM when running with negative value for -XX:CICompilerCount

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Feb 13 22:55:04 PST 2014


On 2/13/14 9:52 PM, Albert wrote:
> Hi Vladimir, thanks for looking at this.
>
> Why would you limit the number of compiler threads to
> os::active_processor_count()? It intuitively makes sense
> However, if for whatever reason, a customer wants more
> compiler threads than processors there is no reason to not
> let him do that.

I don't want an other bug when someone can run with ridiculously high number. You need a lot compiler threads only 
during startup when you need to compile a lot but you need to give some resources to application and GC.

On other hand we don't have limit for ParallelGCThreads. So we may not need it too. Okay.

>
> Yes, tiered works with -XX:CICompilerCount=1. In that case
> we silently start 2 compiler threads, which seems to contradict
> -XX:CICompilerCount=1.
>
> void AdvancedThresholdPolicy::initialize() {
> ..
>    set_c1_count(MAX2(count / 3, 1));
>    set_c2_count(MAX2(count - count / 3, 1));
> ..
> }
>

Okay, then setting default 2 for Tiered is fine.

>
> Do you know why this flag is called  CICompilerCount and not
> CICompilerThreads? Would you say it makes sense to change
> the flag so that it is possible to set the number of C1/C2 compiler
> threads?
>
>   product(ccstr, CICompilerCount, NULL,                                      \
>            "Read compiler commands from this file [.hotspot_compiler]")      \
>

I don't know why it is named such. Unfortunately we can't change it - a lot of people know and use this flag.

>
> This version of the test should be fine.
> http://cr.openjdk.java.net/~anoll/8034775/webrev.01/

Looks good.

Thanks,
Vladimir

>
> Best,
> Albert
>
> On 02/13/2014 05:34 PM, Vladimir Kozlov wrote:
>> Albert,
>>
>> Can you also check upper limit: os::active_processor_count()?
>> Tiered works when CICompilerCount=1. Can you look what is difference in such case from CICompilerCount=2?
>>
>> The test expects "at least 2" but for Client VM and non-Tiered it is 1. So your test will fail.
>>
>> Thanks,
>> Vladimir
>>
>> On 2/13/14 2:54 AM, Albert wrote:
>>> Hi,
>>>
>>> could I get reviews for this small patch?
>>>
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8034775
>>> webrev: http://cr.openjdk.java.net/~anoll/8034775/webrev.00/
>>>
>>> With this patch, we check at VM startup for a reasonable minimal number of compiler
>>> threads (1 for non-tiered, and 2 for tiered). If this minimum is not reached, the VM exits.
>>>
>>> Added regression test.
>>>
>>> Many thanks,
>>> Albert
>


More information about the hotspot-compiler-dev mailing list