整个应用程序的调用图 [英] Call graph of the whole application

查看:269
本文介绍了整个应用程序的调用图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有非toyish工具,可以创建整个应用程序的调用图?我的意思不是刚开图片或指向方法逐方法来绘制调用图。

Is there a non-toyish tool that can create a call graph of the whole application? I don't mean just getting a picture or drawing call graph by means of pointing method-by-method.

我需要调用图,这是程序性访问,即工具应该是刷新在文本模式(如XML)的文件,或建立在内存中调用图(这对于大型应用程序变得困难)。建在一个数据库调用图将是巨大的。

I need a call graph, which is accessible programmatically, i.e. the tool should flush it to a file in text mode (e.g. XML) or build the call graph in memory (which becomes problematic for large application). A call graph built in a DB would be great.

静态和动态呼叫图都是在需求;虽然静态的是一个更有趣一点,事实上,它是overapproximated是可以接受的。

Both static and dynamic call graphs are in demand; though static one is a little more interesting, the fact that it is overapproximated is acceptable.

我已经试过煤烟至今。但是,它不能处理甚至中等规模的项目,如FreeCol(Java源代码可用)。烟尘消耗1.5GB的内存的项目,然后JVM崩溃,如下所述:<一href="http://www.sable.mcgill.ca/pipermail/soot-list/2008-July/001828.html">http://www.sable.mcgill.ca/pipermail/soot-list/2008-July/001828.html

I have tried Soot so far. However, it is not able to handle even medium-size projects like FreeCol (java sources are available). Soot depletes 1.5GB of memory on that project, and then JVM crashes, as described here: http://www.sable.mcgill.ca/pipermail/soot-list/2008-July/001828.html

任何人都可以提供一个工具生成调用图中,如上所述? Java或.NET语言都OK了。

Could anyone suggest a tool to generate a call graph, as described above? Java or .NET languages are ok.

最好的问候, 中士

推荐答案

我们的 DMS软件再造工具包可以构建全球调用图的C,Java和COBOL。 这些被计算为一个内存中的数据结构,就可以走到收集任意的其他事实。 (你可以将其导出到其他一些工具来走过去,但对于一个大的调用图的时间和精力来出口将主导只是分析它的时间,所以我们往往不出口了。情况因人而异)。

Our DMS Software Reengineering Toolkit can construct global call graphs for C, Java, and COBOL. These are computed as an in-memory data structure, and can then be walked to collect arbitrary other facts. (You could export it to some other tool to walk over it, but for a big call graph the time and effort to export would dominate the time to just analyze it, so we tend not to export it. YMMV.).

这是比较容易提取CALL X(...)的抽象形式的语句调用图的信息,因为目标X是正确的有在code在调用点。间接(虚拟或方法调用)的问题在于,实际的通话对象是不平凡的code在调用点,但实际上分散在整个系统更糟的是,由运行条件语句来控制左右。在没有任何附加信息,调用图构造函数来承担间接调用可以去具有匹配签名的任何目标;这引入了图中的大量的假阳性呼叫弧。

It is relatively easy to extract call-graph information from a statement of the abstract form of "CALL X(...)", because the target X is right there in the code at the call site. Indirect (virtual or method calls) are problematic in that the actual call targets are not trivially in the code at the call site, but in fact are scattered around the entire system and worse, controlled by runtime conditionals. In the absence of any additional information, a call graph constructor has to assume an indirect call can go to any target with a matching signature; this introduces lots of false-positive call arcs in the graph.

DMS使用(保守)全球指向的分析作为调用图提取过程的一部分,以确定这种间接调用去,同时尽量减少假阳性。 请参见流量分析和调用图了解什么DM​​S可以提取更多的例子,以及示例图表提取25万功能的系统。

DMS uses a (conservative) global points-to analysis as part of the call-graph extraction process, to determine where such indirect calls go, while minimizing false-positives. See Flow analysis and call graphs for more examples of what DMS can extract, and a sample graph extracted from a system of 250,000 functions.

这篇关于整个应用程序的调用图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆