-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperf.sh
More file actions
50 lines (50 loc) · 3.52 KB
/
perf.sh
File metadata and controls
50 lines (50 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
echo '----- PERF TESTS FOR "COUNTER" (10 threads & 1000 iterations) ------'
echo '------- L1 Cache Misses, Branch Predictions, and Page Faults -------'
echo ''
echo ''
echo '----------------------------- BARRIERS -----------------------------'
echo '___________________________ SENSE BARRIER __________________________'
perf stat --repeat 1000 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./counter -t 10 -i=1000 --bar=sense -o out.txt
echo '__________________________ PTHREAD BARRIER _________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./counter -t 10 -i=1000 --bar=pthread -o out.txt
echo ''
echo ''
echo ''
echo '------------------------------ LOCKS ------------------------------'
echo '_____________________________ TAS LOCK ____________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./counter -t 10 -i=1000 --lock=tas -o out.txt
echo '_____________________________ TTAS LOCK ___________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./counter -t 10 -i=1000 --lock=ttas -o out.txt
echo '____________________________ TICKET LOCK __________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./counter -t 10 -i=1000 --lock=ticket-o out.txt
echo '____________________________ PTHREAD LOCK _________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./counter -t 10 -i=1000 --lock=pthread -o out.txt
echo ''
echo ''
echo ''
echo ''
echo ''
echo ''
echo ''
echo ''
echo '----- PERF TESTS FOR "BUCKETSORT" (10 threads & 1000 integers) -----'
echo '------- L1 Cache Misses, Branch Predictions, and Page Faults -------'
echo ''
echo ''
echo '----------------------------- BARRIERS -----------------------------'
echo '___________________________ SENSE BARRIER __________________________'
perf stat --repeat 1000 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./mysort source.txt -o out.txt -t 10 --alg=bucket --bar=sense
echo '__________________________ PTHREAD BARRIER _________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./mysort source.txt -o out.txt -t 10 --alg=bucket --bar=pthread
echo ''
echo ''
echo ''
echo '------------------------------ LOCKS ------------------------------'
echo '_____________________________ TAS LOCK ____________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./mysort source.txt -o out.txt -t 10 --alg=bucket --lock=tas
echo '_____________________________ TTAS LOCK ___________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./mysort source.txt -o out.txt -t 10 --alg=bucket --lock=ttas
echo '____________________________ TICKET LOCK __________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./mysort source.txt -o out.txt -t 10 --alg=bucket --lock=ticket
echo '____________________________ PTHREAD LOCK _________________________'
perf stat --repeat 10 -e L1-dcache-loads,L1-dcache-load-misses,branch-loads,branch-load-misses,page-faults ./mysort source.txt -o out.txt -t 10 --alg=bucket --lock=pthread