Call graph

[4] A dynamic call graph is a record of an execution of the program, for example as output by a profiler.

Calling context trees are usually not computed statically, because it would take too long for a large program.

With languages that feature dynamic dispatch (i.e. Java or C++),[5] first-class functions (i.e. Python or Racket), or function pointers (i.e. C), computing a static call graph precisely requires alias analysis results.

Many static analysis systems solve the apparent infinite regress by computing both simultaneously.

[6] Call graphs can also be used to detect anomalies of program execution or code injection attacks.

A call graph generated for a simple computer program in Python.