JIT logs

M

Marcin Rze¼nicki

Hi all,
Is there any way to see what is the effect of JIT compilation on my
code? Ideally I'd like to see whether a method has been inlined, if
not then what prevented it - maybe some code output (like gcc's -S),
stuff like this. I am not sure whether it is even possible, so I just
thought I'd ask.
 
M

markspace

Marcin said:
Hi all,
Is there any way to see what is the effect of JIT compilation on my
code? Ideally I'd like to see whether a method has been inlined, if
not then what prevented it - maybe some code output (like gcc's -S),
stuff like this. I am not sure whether it is even possible, so I just
thought I'd ask.


I'm not sure, but HotSpot has the option:

-XX:printCompilation Print message when a method is compiled.

<http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp>


That seems to do something with compilation. You might try it out and
see what sorts of stuff it reports. I tend to agree that sometimes it
would be useful to have insight into exactly what and how optimization
was occurring.
 
M

Marcin Rzeźnicki

I'm not sure, but HotSpot has the option:

-XX:printCompilation

-XX:+PrintCompilation if you wanna have it on :)

  Print message when a method is compiled.
<http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp>

That seems to do something with compilation.  You might try it out and
see what sorts of stuff it reports.  I tend to agree that sometimes it
would be useful to have insight into exactly what and how optimization
was occurring.

It is actually not that useful as it just prints when JITc compiles
something but does not tell you what is the reason for the behavior
you are observing (maybe there are some switches).
I've found something possibly better -XX:+LogCompilation - but it is
mentioned only on OpenJDK wiki, I am not sure what is the relation
between Sun's Hotspot and OpenJDK. Anyway, if I make it work the
problem still remains, as its expected output is probably not very
clear to someone who was not working on Hotspot compiler :) I'll be
searching for a more 'user friendly' tool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top