From a8773900a8268917e3949dbe750df9df688a557c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 17 Jun 2012 21:20:51 +0000 Subject: Profile of duplicating lots of regions. git-svn-id: svn://localhost/ardour2/branches/3.0@12750 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/run-profiling.sh | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'libs/ardour/run-profiling.sh') 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] []" + 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 -- cgit v1.2.3