File tree Expand file tree Collapse file tree 3 files changed +488
-1
lines changed Expand file tree Collapse file tree 3 files changed +488
-1
lines changed Original file line number Diff line number Diff line change 57
57
* _clippy.c
58
58
* .bc
59
59
* .cg.json
60
+ * .cg.dot
61
+ * .cg.svg
60
62
61
63
# ## gcov outputs
62
64
Original file line number Diff line number Diff line change @@ -252,6 +252,15 @@ SUFFIXES += .lo.bc .o.bc
252
252
253
253
% .cg.json : % .bc tools/frr-llvm-cg
254
254
tools/frr-llvm-cg -o $@ $<
255
+ % .cg.dot : % .cg.json
256
+ $(PYTHON ) $(top_srcdir ) /python/callgraph-dot.py $< $@
257
+ % .cg.svg : % .cg.dot
258
+ @echo if the following command fails, you need to install graphviz.
259
+ @echo also, the output is nondeterministic. run it multiple times and use the nicest output.
260
+ @echo tuning parameters may yield nicer looking graphs as well.
261
+ fdp -GK=0.7 -Gstart=42231337 -Gmaxiter=2000 -Elen=2 -Gnodesep=1.5 -Tsvg -o$@ $<
262
+ # don't delete intermediaries
263
+ .PRECIOUS : % .cg.json % .cg.dot
255
264
256
265
# <lib>.la.bc, <lib>.a.bc and <daemon>.bc targets are generated by
257
266
# python/makefile.py
@@ -264,7 +273,7 @@ clean-python:
264
273
find . -name " *.pyc" -o -name " *_clippy.c" | xargs rm -f
265
274
266
275
clean-llvm-bitcode :
267
- find . -name " *.bc" -o -name " *.cg.json" | xargs rm -f
276
+ find . -name " *.bc" -o -name " *.cg.json" -o -name " *.cg.dot " -o -name " *.cg.svg " | xargs rm -f
268
277
269
278
redistclean :
270
279
$(MAKE ) distclean CONFIG_CLEAN_FILES=" $( filter-out $( EXTRA_DIST) , $( CONFIG_CLEAN_FILES) ) "
You can’t perform that action at this time.
0 commit comments