Turn off All Optimizations
Krystal Mo
krystal.mo at oracle.com
Thu Nov 22 11:11:38 PST 2012
Hi Xin,
So what you're looking for is some kind of baseline compiler, right?
How does your study relate to the ones on different threading techniques
for implementing interpreters? e.g. context-threading / inline-threading?
Unfortunately neither C1 nor C2 has a magic switch to turn off all
optimizations. Turning code into SSA-form and back is already
"optimizing" in a lot of cases; both C1 and C2 use SSA-form intermediate
representations, so it wouldn't be reasonable to have such a magic switch.
If you're using the client VM, then you'd be using C1;
If you're using the server VM, and if tiered compilation is not turned
on (e.g. it's not turned on by default on JDK6 and JDK7 to date), then
you'd be using C2;
With tiered compilation, you'd be using both C1 and C2. A method could
be compiled multiple times by either compilers.
- Kris
On 2012/11/23 1:18, Xin Tong wrote:
> I want the compiler to compile the code at the same time. i.e. i want
> to study why the compiler is so much faster than the intepreter from a
> microarchitectural point of view. enabling optimizations complicates
> the problem.
>
> there are 2 compilers in the hotspot, the c1 and opto. which one is used ?
>
> Xin
>
> On Thu, Nov 22, 2012 at 12:06 PM, Aleksey Shipilev
> <aleksey.shipilev at oracle.com> wrote:
>> On 11/22/2012 09:00 PM, Xin Tong wrote:
>>> Is there a way to turn off all the optimizations the hotpot compiler
>>> will do to the bytecode when JITting it.
>> Use plain old interpreter with "-Xint"?
>>
>> -Aleksey.
>>
More information about the hotspot-compiler-dev
mailing list