update roadmap
[lttv.git] / ltt / branches / poly / profile.sh
1 #! /bin/sh
2
3 # Script to build three versions of ltt/lttv (optimized, optimized and profiled
4 # and not optimized) and compare their performance for processing a trace.
5 # The profiled version produces detailed per function timings.
6 #
7 # The script expects 2 arguments: the temporary directory where to install
8 # the three versions and the directory containing the trace to process.
9
10 v1=$1/ltt1
11 v2=$1/ltt2
12 v3=$1/ltt3
13 tracedir=$2
14
15 if [ -z "$1" -o -z "$tracedir" ]; then
16 echo "Usage: $0 tmpdir trace"
17 exit 1
18 fi
19
20 BuildTest () {
21 (make clean; ./autogen.sh --prefix=$1 --enable-lttvstatic CFLAGS="$2" LDFLAGS="$3"; make; make install) >& build.`basename $1`
22 }
23
24 RunTest () {
25 echo RunTest $1 $2
26 rm gmon.out
27 for version in $v1 $v2 $v3; do
28 /usr/bin/time $version/bin/lttv -m batchtest -t $tracedir $1 >& test.`basename $version`.$2
29 done
30 gprof $v2/bin/lttv >& test.profile.$2
31 }
32
33 BuildTest $v1 "-O2 -g" "-g"
34 BuildTest $v2 "-pg -g -O2" "-pg -g"
35 BuildTest $v3 "-g" "-g"
36
37 RunTest --test1 countevents
38 RunTest --test2 computestate
39 RunTest --test4 computestats
40 RunTest --test6 savestate
41 RunTest "--test3 --test6 --test7 --seek-number 200" seekevents
This page took 0.041998 seconds and 4 git commands to generate.