Abstract. To reason about whole-program behavior, dynamic optimizers and analysis tools collect a dynamic call graph using sampling. Previous approaches have not achieved high accuracy with low runtime overhead, and this problem is likely to become more challenging as objectoriented programmers increasingly compose complex programs. This paper demonstrates how to use static and dynamic control-flow graph (CFG) constraints to improve the accuracy of the dynamic call graph (DCG). We introduce the frequency dominator (FDOM) which is a novel CFG relation that extends the dominator relation to expose relative execution frequencies of basic blocks. We combine conservation of flow and dynamic CFG basic block profiles to further improve the accuracy of the DCG. Together these approaches add minimal overhead (1%) and achieve 85% accuracy compared to a perfect call graph for SPEC JVM98 and DaCapo benchmarks. Compared to sampling alone, accuracy improves by 12 to 36%. These results demonstrate that static and dynamic control-flow information offer accurate information for efficiently improving the DCG.
A more recent work done by REF leverages a program's control flow constraints to improve the accuracy of dynamic call graphs from a sampled profile.
Correcting the Dynamic Call Graph Using Control Flow Constraints
In International Conference on Compiler Construction
Computer Science