12 #PROG_NOMARKER="find /usr"
13 PROG_NOMARKER
="./bench1 $NR_CPUS $NR_EVENTS"
14 #PROG_MARKER=$PROG_NOMARKER
15 PROG_MARKER
="./bench2 $NR_CPUS $NR_EVENTS"
17 CMD_NOMARKER
="$TIME '$PROG_NOMARKER >/dev/null 2>&1'"
18 CMD_MARKER
="$TIME '$PROG_MARKER >/dev/null 2>&1'"
19 CMD_MARKERCONN
="UST_AUTOPROBE=1 $TIME '$PROG_MARKER >/dev/null 2>&1'"
20 CMD_MARKERTRACE
="UST_TRACE=1 UST_AUTOPROBE=1 UST_OVERWRITE=1 UST_AUTOCOLLECT=0 $TIME '$PROG_MARKER >/dev/null 2>&1'"
24 rm -f result-
*.txt average-
*.txt perevent-
*.txt
26 echo "using $NR_CPUS processor(s)"
27 echo "using $NR_EVENTS events per cpu"
30 while [ $n -lt "$iters" ]; do
32 echo ">running without markers"
33 echo 3 >/proc
/sys
/vm
/drop_caches
34 t1
=$
(sh
-c "$CMD_NOMARKER")
35 echo "$t1" >>result-nomark.txt
39 .
/average
<result-nomark.txt
>average-nomark.txt
41 ## with markers, not connected
43 #while [ $n -lt "$iters" ]; do
44 # echo ">running with markers, not connected"
45 # echo 3 >/proc/sys/vm/drop_caches
46 # t2=$(sh -c "$CMD_MARKER")
47 # echo "$t2" >>result-mark.txt
48 # echo " time=$t2 sec"
51 #./average <result-mark.txt >average-mark.txt
52 #echo "( $(<average-mark.txt) - $(<average-nomark.txt) ) / $NR_EVENTS" | bc -l >perevent-mark.txt
54 ## with markers, connected
56 #while [ $n -lt "$iters" ]; do
57 # echo ">running with markers activated"
58 # echo 3 >/proc/sys/vm/drop_caches
59 # t2=$(sh -c "$CMD_MARKERCONN")
60 # echo "$t2" >>result-markconn.txt
61 # echo " time=$t2 sec"
64 #./average <result-markconn.txt >average-markconn.txt
65 #echo "( $(<average-markconn.txt) - $(<average-nomark.txt) ) / $NR_EVENTS" | bc -l >perevent-markconn.txt
67 # with markers, connected, tracing
69 while [ $n -lt "$iters" ]; do
70 echo ">running with markers activated, trace recording"
71 echo 3 >/proc
/sys
/vm
/drop_caches
72 t3
=$
(sh
-c "$CMD_MARKERTRACE")
73 echo "$t3" >>result-marktrace.txt
77 .
/average
<result-marktrace.txt
>average-marktrace.txt
78 echo "( $(<average-marktrace.txt) - $(<average-nomark.txt) ) / $NR_EVENTS" |
bc -l >perevent-marktrace.txt
80 function print_penalty
()
85 penalty
=$
(echo "$2 - $1;" |
bc)
86 echo "Penalty ($3) = $penalty sec"
88 #event = penalty / (nr_events * nr_cpus)
89 event
=$
(echo "scale=10; ($penalty / ($NR_EVENTS * $NR_CPUS));" |
bc)
90 echo "Penalty per event ($3) = $event sec"
93 #print_penalty $t1 $t2 "Penalty for markers enabled, not tracing"
94 #print_penalty $t1 $t3 "Penalty for markers enabled, tracing"
This page took 0.035337 seconds and 4 git commands to generate.