How do I view code generated by a Just-In-Time Compiler?

D

David Wake

I'm curious to know how much inlining is going on in modern
Just-In-Time (JIT) compilers such as Java's hotspot.

Is anyone aware of command-line options or tools that enable the code
generated at runtime by a JIT compiler such as HotSpot to be
inspected?

Thanks,

David
 
K

Karsten Baumgarten

David said:
I'm curious to know how much inlining is going on in modern
Just-In-Time (JIT) compilers such as Java's hotspot.

Is anyone aware of command-line options or tools that enable the code
generated at runtime by a JIT compiler such as HotSpot to be
inspected?

http://asm.objectweb.org/eclipse/bco/index.html

They have a plugin for Eclipse and a stand-alone bytecode viewer, if
that is what you were looking for.
 
D

David Wake

Karsten Baumgarten said:
http://asm.objectweb.org/eclipse/bco/index.html

They have a plugin for Eclipse and a stand-alone bytecode viewer, if
that is what you were looking for.

Thanks. I didn't try the plugin, but it looks as if it just views the
bytecode generated by the Java compiler, like "javap -c". I'm
interested in the code execution path that's actually followed at
runtime in the JVM. Please let me know if my supposition is wrong.

David
 
K

Karsten Baumgarten

David said:
Thanks. I didn't try the plugin, but it looks as if it just views the
bytecode generated by the Java compiler, like "javap -c". I'm
interested in the code execution path that's actually followed at
runtime in the JVM. Please let me know if my supposition is wrong.

David

No, that is exactly what the plugin is all about. A possible approach
would be using the debugger of your choice attached to the JVM process.
After a couple of hours reading ASM you might know what you wanted to. ;)
 
T

Thomas Schodt

David said:
I'm curious to know how much inlining is going on in modern
Just-In-Time (JIT) compilers such as Java's hotspot.

You can use these flags
-XX:+PrintCompilation
-XX:+CITime
Is anyone aware of command-line options or tools that enable the code
generated at runtime by a JIT compiler such as HotSpot to be
inspected?

Unfortunately there is no documented user interface to cause Hotspot to
dump its generated code.
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top