Tools for analysing -XX:+LogCompilation output
Thomas.Rodriguez at Sun.COM
Thu Nov 12 09:59:06 PST 2009
The official tool for this is in src/share/tool/LogCompilation in the hotspot repository. By default it produces output something like -XX:+PrintCompilation but if you pass the -i option it will report inlining decisions too. It parses the whole log and builds a representation of each compile with a tree of the call sites and all the inlining. Presumably you could modify it to figure out whatever you need. There are a few parsing bugs in the current version and I have an in progress set of fixes and feature addition in this webrev http://cr.openjdk.java.net/~never/6900757. It's not fully cleaned up yet but it works quite well. There are also some notes on the LogCompilation output itself at http://wikis.sun.com/display/HotSpotInternals/LogCompilation+overview. By the way, currently the client compiler doesn't report anything about inlining so if that's your target you're out of luck for the moment.
On Nov 12, 2009, at 2:06 AM, Ben Evans wrote:
> I hope this mail is appropriate to the group - if there's a doc or a Fine Wiki I ought to be reading instead, please point me at it.
> I am trying to analyse the output of LogCompilation XML logs, and can't find a suitable tool.
> The sort of questions I would like answers to are:
> 1) Which of my methods are being inlined?
> 2) Given a method m and an integer d, which methods at call-depth < d from m are compiled by HS? Which are inlined?
> I see some rather odd results between Solaris 10 and Linux, and am seeking better insight. My current line of attack is parsing the XML output by LogCompilation, but if there's an existing tool or a better approach, I'd love to hear about it.
> Ben Evans
> eFX Algorithmic Trading
> Deutsche Bank, London
> Office: +44 (0)20 7541 3953
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
More information about the hotspot-dev