Compiled call version seems to be slower

Christian Thalinger Christian.Thalinger at Sun.COM
Mon Nov 23 03:01:01 PST 2009


On Sat, 2009-11-21 at 22:44 +0100, Ulf Zibis wrote:
> In my attached example -XX:+PrintAssembly outputs 2 versions for 
> sun.nio.cs.ext.EUC_TW_C_d_b_codeToBuffer4$Decoder::decodeArrayLoop.
> 
> The 1st one seems for call from compiled calling method, the 2nd for 
> call from byte code interpreter.
> Looking closer to the -XX:+PrintAssembly output, 1st version seems to
> be 
> slower, i.e. has more instructions in the loop code.
> 
> Additionally I'm wondering why the finally block is copy-and-pasted
> for 
> each separate return.
> Is that as disired ?

I just had a quick glance at the code and it seems the second one has a
better register allocation, for whatever reason.  And maybe (would need
to look closer) basic block ordering is different.

-- Christian

PS: It would be much easier when you would attach two files and give
some hints (e.g. addresses) where the code is you're talking about.



More information about the hotspot-compiler-dev mailing list