using -XX:-UseCompilerSafepoints
Deneau, Tom
tom.deneau at amd.com
Tue Nov 11 16:34:12 UTC 2014
Aleksey --
It looks like a thread that calls Thread.sleep (as the timing control thread does in the harness) will eventually go thru SafepointSynchonize::block (as part of the ThreadBlockInVM destructor). So if there is a looping benchmark thread compiled without Compiler Safepoints, the control thread will be blocked and will never set the isDone flag.
This is probably OK, just need to document that CompilerSafepoints cannot be turned off.
-- Tom
-----Original Message-----
From: Deneau, Tom
Sent: Monday, November 10, 2014 3:20 PM
To: 'Aleksey Shipilev'; jmh-dev at openjdk.java.net
Subject: RE: using -XX:-UseCompilerSafepoints
Ah, right. I forgot that.
With that in mind, the hang also happens with -f0 So the simplest way to reproduce the problem is (I used JDK8 for this)
java -server -XX:-UseCompilerSafepoints -jar target/benchmarks.jar 'JMHSample_01_.*' -t 1 -wi 5 -i 5 -f 0
-- Tom
-----Original Message-----
From: Aleksey Shipilev [mailto:aleksey.shipilev at oracle.com]
Sent: Monday, November 10, 2014 2:10 PM
To: Deneau, Tom; jmh-dev at openjdk.java.net
Subject: Re: using -XX:-UseCompilerSafepoints
-jvmPrependArgs only affects forked runs.
-f 0 run needs the JVM option right for the host VM (e.g. before -jar).
-Aleksey.
On 11/10/2014 10:45 PM, Deneau, Tom wrote:
> I noticed using -f 0 with -XX:-UseCompilerSafepoints does not hang.
>
> -- Tom
>
>
> -----Original Message-----
> From: Aleksey Shipilev [mailto:aleksey.shipilev at oracle.com]
> Sent: Monday, November 10, 2014 1:13 PM
> To: Deneau, Tom; jmh-dev at openjdk.java.net
> Subject: Re: using -XX:-UseCompilerSafepoints
>
> On 11/10/2014 10:05 PM, Deneau, Tom wrote:
>> I wanted to test the effect of the CompilerSafepoints poll
>> instruction on a doNothing loop. But when I tried this, the first
>> warmup iteration (supposed to be 1 second) never returned. I am
>> using forking. so something like -f 1 -jvmPrependArgs
>> "-XX:-UseCompilerSafepoints"
>>
>> Is this combination legal?
>
> JMH usage seems legal.
>
> I wonder if your code is stuck in the infinite loop somewhere with -XX:-UseCompilerSafepoints.
>
> -Aleksey.
>
>
More information about the jmh-dev
mailing list