Files
linux/tools/perf/tests/shell/probe_vfs_getname.sh
T
Jakub Brnak 92b664dcef perf test probe_vfs_getname: Skip if no suitable line detected
In some cases when calling function add_probe_vfs_getname, line number
can't be detected by 'perf probe -L getname_flags':

  78         atomic_set(&result->refcnt, 1);

	     // one of the following lines should have line number
	     // but sometimes it does not because of optimization
	     result->uptr = filename;
             result->aname = NULL;

  81         audit_getname(result);

To prevent false failures, skip the affected tests if no suitable line
numbers can be detected.

Signed-off-by: Jakub Brnak <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tomas Glozar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2025-04-29 12:28:12 -03:00

26 lines
505 B
Bash
Executable File

#!/bin/sh
# Add vfs_getname probe to get syscall args filenames (exclusive)
# SPDX-License-Identifier: GPL-2.0
# Arnaldo Carvalho de Melo <[email protected]>, 2017
# shellcheck source=lib/probe.sh
. "$(dirname $0)"/lib/probe.sh
skip_if_no_perf_probe || exit 2
[ "$(id -u)" = 0 ] || exit 2
# shellcheck source=lib/probe_vfs_getname.sh
. "$(dirname $0)"/lib/probe_vfs_getname.sh
add_probe_vfs_getname
err=$?
if [ $err -eq 1 ] ; then
skip_if_no_debuginfo
err=$?
fi
cleanup_probe_vfs_getname
exit $err