RFR(XXS): 8036091: compiler/membars/DekkerTest.java fails with -XX:CICompilerCount=1
aleksey.shipilev at oracle.com
Mon Mar 3 03:03:42 PST 2014
But, your original explanation  means C1 and C2 are different
compilers, and CICompilerCount=1 could apply to both of them
individually, which means C1 and C2 get one thread each. We can probably
weasel out by saying the option means "*total* number of compiler threads".
However, that does not help much, because we just annoy users with VM
errors. How would user force a single compiler thread to run?
Before the CICC enforcement:
a) +Tiered, CICC=1: user silently gets two compiler threads
b) -Tiered, CICC=1: user gets single compiler thread
After the CICC change:
a) +Tiered, CICC=1: user gets the VM error. If user still wants to run
Tiered then he/she should set CICC=2 and move on. If user wants a single
thread, then we force him/her to disable Tiered.
b) -Tiered, CICC=1: user is opaque about the change
So, we require users to explicitly segregate the additional
configuration sets depending on +/-Tiered, only to communicate to them
they maybe running two separate compilers which by implementation detail
require two separate threads. I think there is no new and valuable
information to the users in that parlance, only the annoying. I can see
yet another case why would users disable Tiered right away in their
tests, which is not what we want.
I think we should rollback CICC=1 check to silently mean CICC=2 in case
of Tiered and rework Tiered to use the common compiler thread pool, so
that to remove the substance of this discussion. Is this doable?
Otherwise, I think we need to have a proper CCC in place discussing the
change in the accepted values of a product flag.
 "JDK-8034775 changed the minimum number of compiler threads for
tiered compilation to 2, since ***each compiler*** (C1 and C2) requires
a separate compiler thread." (emphasis is mine)
On 03/03/2014 02:38 PM, Albert wrote:
> Hi Aleksey,
> that is not what the description of the flag says:
> product(intx, CICompilerCount, CI_COMPILER_COUNT,
> "Number of compiler threads to run")
> On 03/03/2014 11:36 AM, Aleksey Shipilev wrote:
>> On 03/03/2014 02:28 PM, Albert wrote:
>>> Silently using 2 instead of 1 compiler thread when tiered is enabled
>>> and -XX:CICompilerCount=1 was the default behavior before
>>> JDK-8034775. I worked on JDK-8034775 and back than it occurred to me
>>> that it is strange that the JVM silently 'overrules' an explicit
>>> command given by the user (namely that he/she wants to use only 1
>>> compiler thread).
>> I don't find it strange if you follow the notion of two compilers in
>> TieredCompilation. CICompilerCount=1 means "one thread per compiler",
>> which given two compilers means two threads. If you really want a single
>> thread in the compiler thread pool, then you should disable one of the
More information about the hotspot-compiler-dev