简体   繁体   English

java程序的动态分析

[英]Dynamic profiling for java program

I want to profile a fairly large java program dynamically. 我想动态地分析一个相当大的java程序。 More specifically, I want to generate a dynamic call graph for one run of the program. 更具体地说,我想为程序的一次运行生成动态调用图。 Is there a commandline profiler to generate such graph. 是否有命令行分析器来生成这样的图形。

Thank you. 谢谢。

I think you should try btrace , which is a diagnose tool for Java programs. 我认为你应该尝试使用btrace ,它是Java程序的诊断工具。 You can get enough information from the wiki page, and a lot of examples too. 你可以从维基页面获得足够的信息,也有很多例子。

JProfiler can generate call graphs: JProfiler可以生成调用图:

在此输入图像描述

You can profile without using the JProfiler GUI, either by defining triggers or using the jpcontroller command line utility. 您可以在不使用JProfiler GUI的情况下通过定义触发器或使用jpcontroller命令行实用程序进行分析。 Afterwards, you can open a snapshot in the JProfiler GUI to look at the call graph. 之后,您可以在JProfiler GUI中打开快照以查看调用图。

Disclaimer: My company develops JProfiler. 免责声明:我公司开发JProfiler。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM