Understanding PrintAssembly output
Tom Rodriguez
tom.rodriguez at oracle.com
Thu Dec 8 12:53:43 PST 2011
On Dec 7, 2011, at 3:56 PM, Manohar Jonnalagedda wrote:
> Hello all,
>
> I was just wondering whether you would have some pointers on how to understand the x86 assembly code output by the PrintAssembly flag? My question is specifically oriented towards understanding of loops and branching instructions. In the output that I get, I have many instructions as follows:
>
> B14 : # info about B14
>
> cmpl R10, R10
> jg,s B24
That looks like a missed optimization. The compiler should have eliminated that.
>
> I understand that the above will never go to B24, as the test will always be equal. However, by doing such an analysis, I find that there the CFG for a given method is much smaller than the overall size of the compiled method. Also, some of the branches in this "non-reachable" portion of the assembler code contains inner main loops whose pre loops are in the reachable portion. How do I actually go about understanding such output?
The optimizer may sometimes do surprising things as well. OSR compiles also have very odd structures, particular when the backedge in inside nested loops. If you think something is actually wrong, you should send along the full output for the code in question.
tom
>
> Thanks a lot,
> Manohar
More information about the hotspot-dev
mailing list