diff options
| author | David Lamparter <equinox@diac24.net> | 2020-05-04 20:57:45 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2020-05-05 14:39:12 +0200 |
| commit | 3d62176b18ce0bccf430d2bb48088c6763eb8201 (patch) | |
| tree | 5fd1a67000039e447775a3a42c4a96be1c042586 /Makefile.am | |
| parent | 8fb40377decf45a23d6eefc9ba803b8ff40557d0 (diff) | |
python: add graphviz callgraphs
Uses the JSON data extracted from LLVM bitcode by tools/frr-llvm-cg.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'Makefile.am')
| -rw-r--r-- | Makefile.am | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index f37ae628c2..a959fd9e5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -252,6 +252,15 @@ SUFFIXES += .lo.bc .o.bc %.cg.json: %.bc tools/frr-llvm-cg tools/frr-llvm-cg -o $@ $< +%.cg.dot: %.cg.json + $(PYTHON) $(top_srcdir)/python/callgraph-dot.py $< $@ +%.cg.svg: %.cg.dot + @echo if the following command fails, you need to install graphviz. + @echo also, the output is nondeterministic. run it multiple times and use the nicest output. + @echo tuning parameters may yield nicer looking graphs as well. + fdp -GK=0.7 -Gstart=42231337 -Gmaxiter=2000 -Elen=2 -Gnodesep=1.5 -Tsvg -o$@ $< +# don't delete intermediaries +.PRECIOUS: %.cg.json %.cg.dot # <lib>.la.bc, <lib>.a.bc and <daemon>.bc targets are generated by # python/makefile.py @@ -264,7 +273,7 @@ clean-python: find . -name "*.pyc" -o -name "*_clippy.c" | xargs rm -f clean-llvm-bitcode: - find . -name "*.bc" -o -name "*.cg.json" | xargs rm -f + find . -name "*.bc" -o -name "*.cg.json" -o -name "*.cg.dot" -o -name "*.cg.svg" | xargs rm -f redistclean: $(MAKE) distclean CONFIG_CLEAN_FILES="$(filter-out $(EXTRA_DIST), $(CONFIG_CLEAN_FILES))" |
