Which JVM has a full bytecode execution trace?

六眼飞鱼酱① 提交于 2019-12-08 10:44:34

问题


I need a full bytecode-level execution trace of the entire Java program.

I found the JVM TI with the SingleStep event which allosw me to WRITE an agent which will produce the trace. But surely there is a ready-made JVM option somewhere?


回答1:


Use a debug build of the Hotspot JVM and run it with the -XX:+TraceBytecodes flag. See Trace java bytecode stream for how to build this debug JVM.




回答2:


A full Java bytecode trace? That sounds incredibly slow. HotSpot does not support this functionality using any options and I think your demands are a little crazy. Perhaps think of an alternate means of achieving your ultimate goal that isn't quite as naive.



来源:https://stackoverflow.com/questions/6554542/which-jvm-has-a-full-bytecode-execution-trace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!