@@ -23,53 +23,54 @@ plot()
23
23
{
24
24
gnuplot - << EOF
25
25
set terminal $type
26
+ set xlabel '$4 '
27
+ set ylabel '$5 '
26
28
set output '$1 .$n .$b .$d .$type '
27
- plot '$1 .$n .$b .$d .data' title 'native' w lines, \\
28
- '$1 -nofences.$n .$b .$d .data' title 'nofences' w lines, \\
29
- '$1 -c11.$n .$b .$d .data' title 'c11' w lines, \\
30
- '$1 -dumbc11.$n .$b .$d .data' title 'seqcst' w lines
29
+ set title '$3 (n=$n ; b=$b ; d=$d )'
30
+ plot '$1 .$n .$b .$d .data' title 'native' w $2 , \\
31
+ '$1 -nofences.$n .$b .$d .data' title 'nofences' w $2 , \\
32
+ '$1 -c11.$n .$b .$d .data' title 'c11' w $2 , \\
33
+ '$1 -dumbc11.$n .$b .$d .data' title 'seqcst' w $2
31
34
set output '$1 .$n .$b .$d .log.$type '
35
+ set title '$3 (n=$n ; b=$b ; d=$d ; log)'
32
36
set log x
33
- plot '$1 .$n .$b .$d .data' title 'native' w lines , \\
34
- '$1 -nofences.$n .$b .$d .data' title 'nofences' w lines , \\
35
- '$1 -c11.$n .$b .$d .data' title 'c11' w lines , \\
36
- '$1 -dumbc11.$n .$b .$d .data' title 'seqcst' w lines
37
+ plot '$1 .$n .$b .$d .data' title 'native' w $2 , \\
38
+ '$1 -nofences.$n .$b .$d .data' title 'nofences' w $2 , \\
39
+ '$1 -c11.$n .$b .$d .data' title 'c11' w $2 , \\
40
+ '$1 -dumbc11.$n .$b .$d .data' title 'seqcst' w $2
37
41
EOF
38
42
}
39
43
40
44
tests=' test-cdeque test-cdeque-nofences test-cdeque-c11 test-cdeque-dumbc11'
41
45
42
- for t in $tests ; do
43
- for log in $t .$n .$b .$d .* .log; do
44
- s=${log% .log}
45
- s=${s##* .}
46
- awk " {x+=\$ 1;++n} END{print $s , x/n}" $log
47
- done | sort -n > $t .$n .$b .$d .data
48
- done
49
- plot test-cdeque
50
-
51
- for t in $tests ; do
52
- for log in $t .$n .$b .$d .* .log; do
53
- s=${log% .log}
54
- s=${s##* .}
55
- if [ $s -eq 0 ]; then
56
- echo 0 1.0
57
- else
58
- awk " {x+=\$ (NF-4)/\$ NF;++n} END{print $s , x/n}" $log
59
- fi
60
- done | sort -n > steal.$t .$n .$b .$d .data
61
- done
62
- plot steal.test-cdeque
63
-
64
- for t in $tests ; do
65
- for log in $t .$n .$b .$d .* .log; do
66
- s=${log% .log}
67
- s=${s##* .}
68
- if [ $s -eq 0 ]; then
69
- echo 0 1.0
70
- else
71
- awk " {x+=\$ (NF-4)/\$ 1;++n} END{print $s , x/n}" $log
72
- fi
73
- done | sort -n > stealtime.$t .$n .$b .$d .data
74
- done
75
- plot stealtime.test-cdeque
46
+ if [ -n " $( find . -maxdepth 1 -name " test-*.$n .$b .$d .log" ) " ]; then
47
+ for t in $tests ; do
48
+ awk ' {print $NF, $1}' $t .$n .$b .$d .log |
49
+ sort -n > time.$t .$n .$b .$d .data
50
+ done
51
+ plot time.test-cdeque points \
52
+ ' Execution time' \
53
+ ' effective steals' ' execution time (s)'
54
+ for t in $tests ; do
55
+ awk ' {print $(NF-2), $1}' $t .$n .$b .$d .log |
56
+ sort -n > time_exp_tput.$t .$n .$b .$d .data
57
+ done
58
+ plot time_exp_tput.test-cdeque points \
59
+ ' Execution time' \
60
+ ' expected steal throughput (s⁻¹)' ' execution time (s)'
61
+ for t in $tests ; do
62
+ awk ' {print $NF/$1, $1}' $t .$n .$b .$d .log |
63
+ sort -n > time_eff_tput.$t .$n .$b .$d .data
64
+ done
65
+ plot time_eff_tput.test-cdeque points \
66
+ ' Execution time' \
67
+ ' effective steal throughput (s⁻¹)' ' execution time (s)'
68
+ for t in $tests ; do
69
+ awk ' {print $NF/$1, 2*$(NF-3)/$1}' $t .$n .$b .$d .log |
70
+ sort -n > tput_eff_tput.$t .$n .$b .$d .data
71
+ done
72
+ plot tput_eff_tput.test-cdeque points \
73
+ ' Critical path throughput' \
74
+ ' effective steal throughput (s⁻¹)' \
75
+ ' push/take throughput (s⁻¹)'
76
+ fi
0 commit comments