/usr/src/linux-headers-5.15.0-181/tools/perf/tests/shell
NameSizeModeActions
lib/-0755rm
buildid.sh37720755editdlrm
daemon.sh107870755editdlrm
pipe_test.sh13930755editdlrm
probe_vfs_getname.sh3460755editdlrm
record+probe_libc_inet_pton.sh31150755editdlrm
record+script_probe_vfs_getname.sh12390755editdlrm
record+zstd_comp_decomp.sh11240755editdlrm
stat+csv_summary.sh6310755editdlrm
stat+shadow_stat.sh15870755editdlrm
stat_bpf_counters.sh13460755editdlrm
test_arm_coresight.sh49020755editdlrm
test_uprobe_from_different_cu.sh15210644editdlrm
trace+probe_vfs_getname.sh14060755editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/tools/perf/tests/shell/pipe_test.sh (1393B)
#!/bin/sh # perf pipe recording and injection test # SPDX-License-Identifier: GPL-2.0 # skip if there's no compiler if ! [ -x "$(command -v cc)" ]; then echo "failed: no compiler, install gcc" exit 2 fi file=$(mktemp /tmp/test.file.XXXXXX) data=$(mktemp /tmp/perf.data.XXXXXX) cat < #include #include volatile int done; void sigalrm(int sig) { done = 1; } __attribute__((noinline)) void noploop(void) { while (!done) continue; } int main(int argc, char *argv[]) { int sec = 1; if (argc > 1) sec = atoi(argv[1]); signal(SIGALRM, sigalrm); alarm(sec); noploop(); return 0; } EOF if ! perf record -e task-clock:u -o - ${file} | perf report -i - --task | grep test.file; then echo "cannot find the test file in the perf report" exit 1 fi if ! perf record -e task-clock:u -o - ${file} | perf inject -b | perf report -i - | grep noploop; then echo "cannot find noploop function in pipe #1" exit 1 fi perf record -e task-clock:u -o - ${file} | perf inject -b -o ${data} if ! perf report -i ${data} | grep noploop; then echo "cannot find noploop function in pipe #2" exit 1 fi perf record -e task-clock:u -o ${data} ${file} if ! perf inject -b -i ${data} | perf report -i - | grep noploop; then echo "cannot find noploop function in pipe #3" exit 1 fi rm -f ${file} ${data} ${data}.old exit 0