Skip to content

Commit

Permalink
refactor options, add callgraph dot generation, fix filterfunction fi…
Browse files Browse the repository at this point in the history
…ltering
  • Loading branch information
Kamilcuk committed Dec 6, 2024
1 parent c07644d commit bcb7fe9
Show file tree
Hide file tree
Showing 2 changed files with 181 additions and 134 deletions.
39 changes: 19 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
MAKEFLAGS = -rR --warn-undefined-variables --no-print-directories
SHELL = bash
.PHONE: all test pyright L_lib analyze dump 2L_lib 2analyze 2dump 12compare xdot xdot2 xdot_L_argparse xdot_L_asa_has snakeviz
ARGS ?=

.PHONY: all test pyright L_lib analyze dump 2L_lib 2analyze 2dump 12compare xdot xdot2 xdot_L_argparse xdot_L_asa_has snakeviz

all:
echo
test:
Expand All @@ -14,20 +17,20 @@ MODE ?= XTRACE
L_lib:
L_bash_profile profile -o profile.$(MODE).txt 'export L_UNITTEST_UNSET_X=0; . ../L_lib/bin/L_lib.sh test' -m $(MODE)
analyze:
L_bash_profile analyze profile.$(MODE).txt
dump:
L_bash_profile analyze profile.$(MODE).txt --dumprecords profile.$(MODE).records.txt
xdot:
L_bash_profile analyze profile.$(MODE).txt --dot profile.$(MODE).dot --dotlimit 3
L_bash_profile analyze profile.$(MODE).txt \
--dumprecords profile.$(MODE).records.txt \
--callgraph profile.$(MODE).callgraph.dot \
--callstats profile.$(MODE).callstats.dot \
--pstats profile.$(MODE).pstats $(ARGS)
xdot: analyze
xdot profile.$(MODE).dot
xdot2 xdot_L_argparse:
L_bash_profile analyze profile.$(MODE).txt --dot profile.$(MODE).dot --dotfunction L_argparse --dotcmds --dotlimit 6
xdot_L_argparse: ARGS = --filterfunction L_argparse --callstatscmds --dotlimit 6
xdot_L_argparse: analyze
xdot profile.$(MODE).dot
xdot_L_asa_has:
L_bash_profile analyze profile.$(MODE).txt --dot profile.$(MODE).dot --dotcmds --dotfunction L_asa_has
xdot_L_asa_has: ARGS = --dotcmds --dotfunction L_asa_has
xdot_L_asa_has: analyze
xdot profile.$(MODE).dot
snakeviz:
L_bash_profile analyze profile.$(MODE).txt --pstats profile.$(MODE).pstats
snakeviz: analyze
snakeviz profile.$(MODE).pstats

_compare:
Expand All @@ -42,22 +45,18 @@ _compare:
2L_lib: L_lib
2analyze: MODE=DEBUG
2analyze: L_lib
2dump: MODE=DEBUG
2dump: L_lib
12compare: A=XTRACE B=DEBUG
12compare: compare
2xdot: MODE=DEBUG
2xdot: xdot
12compare: A=XTRACE B=DEBUG
12compare: compare


3L_lib: MODE=VAR
3L_lib: L_lib
3analyze: MODE=VAR
3analyze: L_lib
3dump: MODE=VAR
3dump: L_lib
13compare: A=XTRACE B=VAR
13compare: compare
3xdot: MODE=VAR
3xdot: xdot
13compare: A=XTRACE B=VAR
13compare: compare

Loading

0 comments on commit bcb7fe9

Please sign in to comment.