Skip to main content

add support for print compiled code for debug purpose

2 replies [Last post]
wangzaixiang
Offline
Joined: 2004-11-23
Points: 0

I think it will be a interesting feature if the JVM add an option:

--Xprint-compile class/method

and once the method is compiled, the JVM print out the machine code or assemble code.

This feature will be interesting for all Java fans because they can see how the Hotspot compile the code, and get a really feeling of the performance. also, this will improve the JVM because fans can give more optimize advice on compiled code.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kbr
Offline
Joined: 2003-06-16
Points: 0

If you run with the server compiler with a non-product build of HotSpot then -XX:+PrintCompilation -XX:+PrintOptoAssembly will do this. There is a separate disassembler.dll which we don't have the rights to distribute which allows disassembly to be printed for both compiled Java methods and other pieces of generated assembly like the interpreter. Java licensees typically get access to the disassembler as well as other tools.

Ken Russell, Java HotSpot VM Group, Sun Microsystems

wangzaixiang
Offline
Joined: 2004-11-23
Points: 0

Thanks.

when i read the source, i find this issue, and i cant find a downloadable disassembler.dll. so maybe we can simply dump the Compilation result in bytes to a file, and then we may using the binutils in linux to disassemble it.