update compat
[lttv.git] / trunk / lttv / profile.sh
... / ...
CommitLineData
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
10v1=$1/ltt1
11v2=$1/ltt2
12v3=$1/ltt3
13tracedir=$2
14
15if [ -z "$1" -o -z "$tracedir" ]; then
16 echo "Usage: $0 tmpdir trace"
17 exit 1
18fi
19
20BuildTest () {
21 (make clean; ./autogen.sh --prefix=$1 --enable-lttvstatic CFLAGS="$2" LDFLAGS="$3"; make; make install) >& build.`basename $1`
22}
23
24RunTest () {
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
33BuildTest $v1 "-O2 -g" "-g"
34BuildTest $v2 "-pg -g -O2" "-pg -g"
35BuildTest $v3 "-g" "-g"
36
37RunTest --test1 countevents
38RunTest --test2 computestate
39RunTest --test4 computestats
40RunTest --test6 savestate
41RunTest "--test3 --test6 --test7 --seek-number 200" seekevents
This page took 0.025992 seconds and 4 git commands to generate.