Call Graph Explorer

Load a call graph, then ask which callers can reach two functions, which functions in a package reach a target, and how one function gets to another.

1. Load a call graph

How do I get a call graph?

Any tool that prints caller → callee pairs works. Some starting points:

# Go (golang.org/x/tools): static + dynamic calls with call sites
go install golang.org/x/tools/cmd/callgraph@latest
callgraph -algo=vta ./... > cg.txt
# Go, whole program from main packages, quoted pairs
callgraph -algo=rta -format=digraph ./cmd/... > cg.txt

# Python
pyan3 $(find pkg -name '*.py') --uses --no-defines --dot > cg.dot

# C / C++ (LLVM) – writes <file>.callgraph.dot
clang -S -emit-llvm file.c -o file.ll
opt -passes=dot-callgraph -disable-output file.ll

# Anything else: one edge per line
pkg/a.Handler -> pkg/b.Save
caller,callee,caller_package,callee_package   # optional CSV header

Packages are read from names such as pkg/path.Func and (*pkg/path.Type).Method, or from a CSV package column.

Where a value comes from: that needs data-flow analysis of source code, which this tool does not do. If another tool gives you source -> sink edges, load them here; "Callers of F" then lists every origin of F, and "Common callers" finds shared origins.

2. Ask a question

Lowest = reaches A and B without passing through another common caller.

Load a graph above — or press Try an example — then pick a question.

3. Graph & export

Run a question to draw its result (up to 500 functions) or export it.