3 # UST vs SystemTap scalability test
4 # This script can run 4 different tests :
5 # - UST in flight recorder mode
6 # - UST writing the trace to disk
7 # - SystemTap in flight recorder mode
8 # - SystemTap writing the trace to disk
10 # You need to be root to run the SystemTap tests because of the rmmod
12 BINARY
=.
/tracepoint_benchmark
14 REPORT
=/tmp
/testreport
19 STAPTMP
=/tmp
/stapconsole
20 STAPPROBE
=testutrace.stp
22 rm $REPORT 2>/dev
/null
24 ust_flight_recorder
() {
25 # flight recorder, don't record trace to disk.
26 # default buffer size is 4k
27 echo -n "* UST Flight recorder : " |
tee >> $REPORT
28 export UST_AUTOCOLLECT
=0
29 export UST_OVERWRITE
=1
30 export UST_SUBBUF_NUM
=16
35 # Collect traces to disk
36 # default buffer size is 4k
37 echo -n "* UST Write to disk : " |
tee >> $REPORT
38 export UST_AUTOCOLLECT
=1
39 export UST_OVERWRITE
=0
40 export UST_SUBBUF_NUM
=16
44 stap_flight_recorder
() {
45 echo -n "* SystemTap Flight recorder : " |
tee >> $REPORT
47 $STAP $STAPPROBE -F -m $MODNAME
51 echo -n "* SystemTap Write to disk : " |
tee >> $REPORT
53 $STAP $STAPPROBE -o $STAPTMP -m $MODNAME &
57 echo "Userspace tracing scalability test report" |
tee >> $REPORT
60 TEST
=ust_flight_recorder
66 TEST
=stap_flight_recorder
67 CLEANUP
="rmmod $MODNAME 2>/dev/null"
71 CLEANUP
="killall stapio 2>/dev/null"
74 echo "Usage : $0 {ust_flight_recorder|ust_disk|stap_flight_recorder|stap_disk}"
79 for nr_threads
in 1 2 4 8; do
80 echo "" |
tee >> $REPORT
81 echo Number of threads
: $nr_threads |
tee >> $REPORT
82 echo -n "* Baseline : " |
tee >> $REPORT
87 /usr
/bin
/time -f "%E" -o $TMPLOG $BINARY ${nr_threads}
88 cat $TMPLOG >> $REPORT
93 /usr
/bin
/time -f "%E" -o $TMPLOG $WRAPPER $BINARY ${nr_threads}
94 cat $TMPLOG >> $REPORT
This page took 0.032788 seconds and 4 git commands to generate.