查找Java程序的实际运行时调用树 [英] Finding the actual runtime call tree of a Java Program
问题描述
想想我要更改原始流程。找到调用层次结构/引用并了解流程是很麻烦的。
我在Eclipse中有什么解决方案吗?还是插件?例如,我只需要按时间顺序的方法名称日志。然后我不需要担心与我的给定输入无关的方法
更新:在eclipse中使用调试模式或添加打印消息是不可行的。该程序是sooooo大。 :)
您可以使用 AspectJ 记录名为的所有方法的名称,而不用更改原始程序。
请参阅 跟踪 例如
aspect SimpleTracing {
pointcut tracedCall():
call(void FigureElement。 draw(GraphicsContext));
before():tracedCall(){
System.out.println(Entering:+ thisJoinPoint);
}
}
Suppose I have a big program that consists of hundreds of methods in it. And according to the nature of input the program flow is getting changed.
Think I want to make a change to the original flow. And it is big hassle to find call hierarchy/ references and understand the flow.
Do I have any solution for this within Eclipse? Or a plugin? As an example, I just need a Log of method names that is in order of time. Then I don't need to worry about the methods that are not relevant with my "given input"
Update : Using debug mode in eclipse or adding print messages are not feasible. The program is sooooo big. :)
You could use AspectJ to log the name of all methods called without changing your original program.
See tracing for instance.
aspect SimpleTracing {
pointcut tracedCall():
call(void FigureElement.draw(GraphicsContext));
before(): tracedCall() {
System.out.println("Entering: " + thisJoinPoint);
}
}
这篇关于查找Java程序的实际运行时调用树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!