3 # Run load-save-session utility program on an existing session, as the session
4 # may be modified I would not use this utility on a session that you care
7 # The utility outputs some basic timing information and can be used to look at
8 # changes in the Session file resulting from the save if for instance the
9 # session is contained in a git repository.
12 TOP=`dirname "$0"`/../..
13 . $TOP/build/gtk2_ardour/ardev_common_waf.sh
14 ARDOUR_LIBS_DIR=$TOP/build/libs/ardour
15 PROGRAM_NAME=load-save-session
17 if [ ! -f './tempo.cc' ];
18 then echo "This script must be run from within the libs/ardour directory";
23 if [ "$1" == "--debug" -o "$1" == "--valgrind" -o "$1" == "--massif" ]; then
29 if [ "$DIR_PATH" == "" ]; then
30 echo "Syntax: load-save-session.sh <session dir>"
34 NAME=`basename $DIR_PATH`
36 if [ "$OPTION" == "--debug" ]; then
37 gdb --args $ARDOUR_LIBS_DIR/$PROGRAM_NAME $DIR_PATH $NAME
38 elif [ "$OPTION" == "--valgrind" ]; then
39 MEMCHECK_OPTIONS="--leak-check=full"
40 valgrind $MEMCHECK_OPTIONS \
41 $ARDOUR_LIBS_DIR/$PROGRAM_NAME $DIR_PATH $NAME
42 elif [ "$OPTION" == "--massif" ]; then
43 MASSIF_OPTIONS="--time-unit=ms --massif-out-file=massif.out.$NAME"
44 valgrind --tool=massif $MASSIF_OPTIONS \
45 $ARDOUR_LIBS_DIR/$PROGRAM_NAME $DIR_PATH $NAME
47 $ARDOUR_LIBS_DIR/$PROGRAM_NAME $DIR_PATH $NAME