TieredCompilation question
Deneau, Tom
tom.deneau at amd.com
Fri Jan 11 08:47:30 PST 2013
I tried Method::set_dont_inline(). It was a little unclear whether that affected only C1 or both C1 and C2. I like your suggestion better.
Question: if MC had already been compiled as C2, I am assuming it would never then get compiled by C1, is that correct?
-- Tom
From: gilwooden at gmail.com [mailto:gilwooden at gmail.com] On Behalf Of Gilles Duboscq
Sent: Friday, January 11, 2013 3:39 AM
To: Deneau, Tom
Cc: Vladimir Kozlov; sumatra-dev at openjdk.java.net
Subject: Re: TieredCompilation question
I rather think that even though inlining MC into MA may be slower than calling the C2-compiled MC, it should not matter too much since it's a transitory state.
In the end MA should be compiled using C2 and the assumption is that MC will get inlined in this compilation too. And anyway, if it does not then it would be back to calling the C2-compiled MC.
If you want to avoid compilation of a method by C1 altogether you could try Method::set_not_c1_compilable() that way C1 would neither try to compile it or try to inline it.
Gilles
On Fri, Jan 11, 2013 at 5:31 AM, Deneau, Tom <tom.deneau at amd.com<mailto:tom.deneau at amd.com>> wrote:
So the assumption is that MC inlined into MA will be better than calling a C2-compiled version of MC?
I suppose it is also possible to forbid inlining of MC, so it would have to call the compiled version?
-- Tom
-----Original Message-----
From: sumatra-dev-bounces at openjdk.java.net<mailto:sumatra-dev-bounces at openjdk.java.net> [mailto:sumatra-dev-bounces at openjdk.java.net<mailto:sumatra-dev-bounces at openjdk.java.net>] On Behalf Of Vladimir Kozlov
Sent: Thursday, January 10, 2013 7:59 PM
To: sumatra-dev at openjdk.java.net<mailto:sumatra-dev at openjdk.java.net>
Subject: Re: TieredCompilation question
You step on your own mine :)
Yes, it has such pathology for inlined by C1 methods. The assumption is
that when C2 will compile MA it will also inline MB and MC. You can try
to lower Tier4CompileThreshold.
Vladimir
On 1/10/13 5:22 PM, Deneau, Tom wrote:
> I will display my ignorance of TieredCompilation here. :)
> I think I am seeing the following but I am not positive...
>
> Let's say method MA calls MB calls MC.
> MC gets compiled at C2 level.
> Everything works well and the MC method compiled at C2 gets called several hundred times.
>
> Now method MA gets compiled at level 3 in C1.
> This C1 compilation of MA decides to inline MB and then MC into its C1 compilation.
> So it no longer uses the C2 compilation of MC??
>
> In my particular case MC had called some intrinsic routines which were only defined as intrinsics in C2.
> So the net effect of being compiled at C1 when it was inlined into MA was that we lose those intrinsics.
>
> Is this how TieredCompilation is supposed to work?
>
> I should add here that the early compilation of MC at C2 level was in my case artificially forced by some code I added to Hotspot (so I might have missed something in setting that up).
>
> With Tiered off, this all worked nicely of course.
>
> -- Tom
>
More information about the sumatra-dev
mailing list