File Index
Files and directories
Sign in
FILE

trace_record_replay.sh

File preview with syntax highlighting.

linux-6.19.14/tools/perf/tests/shell/trace_record_replay.sh BASH
 1#!/bin/bash
 2# perf trace record and replay
 3# SPDX-License-Identifier: GPL-2.0
 4
 5# Check that perf trace works with record and replay
 6
 7# shellcheck source=lib/probe.sh
 8. "$(dirname $0)"/lib/probe.sh
 9
10skip_if_no_perf_trace || exit 2
11[ "$(id -u)" = 0 ] || exit 2
12
13file=$(mktemp /tmp/temporary_file.XXXXX)
14
15perf trace record -o ${file} sleep 1 || exit 1
16if ! perf trace -i ${file} 2>&1 | grep nanosleep; then
17	echo "Failed: cannot find *nanosleep syscall"
18	exit 1
19fi
20
21rm -f ${file}
~/ Read-only file preview.