-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperf_ardupilot_loop.sh
136 lines (99 loc) · 2.83 KB
/
perf_ardupilot_loop.sh
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
#Script to execute the perf command
echo "SCRIPT WORKING"
echo "You passed in $1 as PID for ArduCoptert"
echo "You passed in $2 as PID for RCIO_Worker"
#echo "You passed in $3 as PID for SLAM_APP"
#sudo perf stat -e instructions -e branches -e L1-dcache-loads -e L1-dcache-misses -e cache-misses -e cache-references -p 341 -B
#sudo perf stat -d -p 338 -B sleep 5
while :
do
date +"%T"
echo "Profiling ArduCopter and RCIO now PID $1 and PID $2"
sudo perf stat -B -e branch-instructions \
-e branch-misses \
-e bus-cycles \
-e cache-misses \
-e cache-references \
-p $1,$2 sleep 5
date +"%T"
echo "Profiling ArduCopter and RCIO now PID $1 and PID $2"
sudo perf stat -B \
-e cpu-cycles \
-e instructions \
-e alignment-faults \
-e bpf-output \
-e context-switches \
-p $1,$2 sleep 5
date +"%T"
echo "Profiling ArduCopter and RCIO now PID $1 and PID $2"
sudo perf stat -B \
-e cpu-clock \
-e cpu-migrations \
-e dummy \
-e emulation-faults \
-e major-faults \
-p $1,$2 sleep 5
date +"%T"
echo "Profiling ArduCopter and RCIO now PID $1 and PID $2"
sudo perf stat -B \
-e minor-faults \
-e page-faults \
-e task-clock \
-e duration_time \
-e L1-dcache-load-misses \
-p $1,$2 sleep 5
date +"%T"
echo "Profiling ArduCopter and RCIO now PID $1 and PID $2"
sudo perf stat -B \
-e L1-dcache-loads \
-e L1-dcache-store-misses \
-e L1-dcache-stores \
-e L1-icache-load-misses \
-e L1-icache-loads \
-p $1,$2 sleep 5
date +"%T"
echo "Profiling ArduCopter and RCIO now PID $1 and PID $2"
sudo perf stat -B \
-e LLC-load-misses \
-e LLC-loads \
-e LLC-store-misses \
-e LLC-stores \
-e branch-load-misses \
-p $1,$2 sleep 5
date +"%T"
echo "Profiling ArduCopter and RCIO now PID $1 and PID $2"
sudo perf stat -B \
-e branch-loads \
-e dTLB-load-misses \
-e dTLB-store-misses \
-e iTLB-load-misses \
-p $1,$2 sleep 5
done
#-e armv7_cortex_a7/cid_write_retired/ \
#-p 338 sleep 5
#-e armv7_cortex_a7/cpu_cycles/ \
#-e armv7_cortex_a7/exc_return/ \
#-e armv7_cortex_a7/exc_taken/ \
#-e armv7_cortex_a7/inst_retired/ \
#-e armv7_cortex_a7/inst_spec/ \
#-e armv7_cortex_a7/l1d_cache/ \
#-p 338 sleep 5
#-e armv7_cortex_a7/l1d_cache_refill/ \
#-e armv7_cortex_a7/l1d_cache_wb/ \
#-e armv7_cortex_a7/l1d_tlb_refill/ \
#-e armv7_cortex_a7/l1i_cache/ \
#-e armv7_cortex_a7/l1i_cache_refill/ \
#-e armv7_cortex_a7/l1i_tlb_refill/ \
#-e armv7_cortex_a7/l2d_cache/ \
#-e armv7_cortex_a7/l2d_cache_refill/ \
#-e armv7_cortex_a7/l2d_cache_wb/ \
#-e armv7_cortex_a7/ld_retired/ \
#-e armv7_cortex_a7/mem_access/ \
#-e armv7_cortex_a7/memory_error/ \
#-e armv7_cortex_a7/pc_write_retired/ \
#-e armv7_cortex_a7/st_retired/ \
#-e armv7_cortex_a7/sw_incr/ \
#-e armv7_cortex_a7/ttbr_write_retired/ \
#-e armv7_cortex_a7/unaligned_ldst_retired/ \
#-p 338 sleep 5