summaryrefslogtreecommitdiff
path: root/libs/ardour/run-profiling.sh
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-17 21:20:51 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-17 21:20:51 +0000
commita8773900a8268917e3949dbe750df9df688a557c (patch)
treea1a796f20d625b53f3cc6c7bf839a348d2ea9673 /libs/ardour/run-profiling.sh
parent8fc866309f4a03c157a329cbfdb6d9eb9150d9fe (diff)
Profile of duplicating lots of regions.
git-svn-id: svn://localhost/ardour2/branches/3.0@12750 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/run-profiling.sh')
-rw-r--r--libs/ardour/run-profiling.sh31
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