且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

整个应用程序的调用图

更新时间:2023-01-10 07:41:11

我们的 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.