mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 18:12:26 -04:00
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 <jbrnak@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tomas Glozar <tglozar@redhat.com>
Link: https://lore.kernel.org/r/20250324144523.597557-1-jbrnak@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
26 lines
505 B
Bash
Executable File
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 <acme@kernel.org>, 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
|