diff options
Diffstat (limited to 'libs/ardour/run-profiling.sh')
-rw-r--r-- | libs/ardour/run-profiling.sh | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/libs/ardour/run-profiling.sh b/libs/ardour/run-profiling.sh index f490080446..30daac9e6e 100644 --- a/libs/ardour/run-profiling.sh +++ b/libs/ardour/run-profiling.sh @@ -8,6 +8,11 @@ if [ ! -f './tempo.cc' ]; then exit 1; fi +if [ "$1" == "" ]; then + echo "Syntax: run-profiling.sh [flag] <test> [<args>]" + exit 1; +fi + cd ../.. top=`pwd` cd build @@ -23,15 +28,23 @@ export ARDOUR_MCP_PATH="../mcp" export ARDOUR_DLL_PATH=$libs export ARDOUR_DATA_PATH=$top/gtk2_ardour:$top/build/gtk2_ardour:. -# export LD_PRELOAD=/home/carl/src/libfakejack/libjack.so -session='32tracks' +export LD_PRELOAD=/home/carl/src/libfakejack/libjack.so +# session='32tracks' + +p=$1 +if [ "$p" == "--debug" -o "$p" == "--valgrind" -o "$p" == "--callgrind" ]; then + f=$p + p=$2 + shift 1 +fi +shift 1 -if [ "$1" == "--debug" ]; then - gdb --args ./libs/ardour/run-profiling $session -elif [ "$1" == "--valgrind" ]; then - valgrind ./libs/ardour/run-profiling $session -elif [ "$1" == "--callgrind" ]; then - valgrind --tool=callgrind ./libs/ardour/run-profiling $session +if [ "$f" == "--debug" ]; then + gdb --args ./libs/ardour/$p $* +elif [ "$f" == "--valgrind" ]; then + valgrind ./libs/ardour/$p $* +elif [ "$f" == "--callgrind" ]; then + valgrind --tool=callgrind ./libs/ardour/$p $* else - ./libs/ardour/run-profiling $session + ./libs/ardour/$p $* fi |