Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/tools/testing/selftests/bpf/benchs/run_bench_trigger.sh
29270 views
1
#!/bin/bash
2
3
set -eufo pipefail
4
5
def_tests=( \
6
usermode-count kernel-count syscall-count \
7
fentry fexit fmodret \
8
rawtp tp \
9
kprobe kprobe-multi kprobe-multi-all \
10
kretprobe kretprobe-multi kretprobe-multi-all \
11
)
12
13
tests=("$@")
14
if [ ${#tests[@]} -eq 0 ]; then
15
tests=("${def_tests[@]}")
16
fi
17
18
p=${PROD_CNT:-1}
19
20
for t in "${tests[@]}"; do
21
summary=$(sudo ./bench -w2 -d5 -a -p$p trig-$t | tail -n1 | cut -d'(' -f1 | cut -d' ' -f3-)
22
printf "%-15s: %s\n" $t "$summary"
23
done
24
25