mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf test probe_vfs_getname: Also look for the probe line in do_getname()
@ 2026-09-28 18:05 Ian Rogers
  2026-09-28 20:00 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Rogers @ 2026-09-28 18:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Leo Yan, Peter Zijlstra, Ingo Molnar, Jiri Olsa, Adrian Hunter,
	James Clark, linux-perf-users, linux-kernel, Ian Rogers

Since commit 9fa3ec84587c ("allow incomplete imports of filenames"), in
v7.0, getname_flags() only calls do_getname(). None of the lines the
vfs_getname tests search for are in getname_flags() any more, so the
tests always skip. Fall back to the initname() call in do_getname().

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
---
Tested on a v7.1.6 kernel with its debuginfo and fs/namei.c, which
perf probe -L needs. The three vfs_getname tests now pass instead of
skipping.

 tools/perf/tests/shell/lib/probe_vfs_getname.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
index 88cd0e26d5f6..a4230a83bcae 100644
--- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
@@ -13,6 +13,7 @@ cleanup_probe_vfs_getname() {
 add_probe_vfs_getname() {
 	add_probe_verbose=$1
 	if [ $had_vfs_getname -eq 1 ] ; then
+		local func=getname_flags
 		result_initname_re="[[:space:]]+([[:digit:]]+)[[:space:]]+initname.*"
 		line=$(perf probe -L getname_flags 2>&1 | grep -E "$result_initname_re" | sed -r "s/$result_initname_re/\1/")
 
@@ -28,13 +29,20 @@ add_probe_vfs_getname() {
 			line=$(perf probe -L getname_flags 2>&1 | grep -E "$result_aname_re" | sed -r "s/$result_aname_re/\1/")
 		fi
 
+		# Since v7.0 getname_flags() is a wrapper around do_getname().
+		if [ -z "$line" ] ; then
+			func=do_getname
+			line=$(perf probe -L $func 2>&1 | grep -E "$result_initname_re" |
+				sed -r "s/$result_initname_re/\1/")
+		fi
+
 		if [ -z "$line" ] ; then
 			echo "Could not find probeable line"
 			return 2
 		fi
 
-		perf probe -q       "vfs_getname=getname_flags:${line} pathname=result->name:string" || \
-		perf probe $add_probe_verbose "vfs_getname=getname_flags:${line} pathname=filename:ustring" || return 1
+		perf probe -q       "vfs_getname=${func}:${line} pathname=result->name:string" || \
+		perf probe $add_probe_verbose "vfs_getname=${func}:${line} pathname=filename:ustring" || return 1
 	fi
 }
 
-- 
2.56.0.rc1.315.gc6ed9934b7-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-28 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 18:05 [PATCH] perf test probe_vfs_getname: Also look for the probe line in do_getname() Ian Rogers
2026-09-28 20:00 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®