mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
perf test shell: Use a fallback to get the pathname in vfs_getname
Some kernels, like 4.19.13-300.fc29.x86_64 in fedora 29, fail with the existing probe definition asking for the contents of result->name, working when we ask for the 'filename' variable instead, so add a fallback to that. Now those tests are back working on fedora 29 systems with that kernel: # perf test vfs_getname 65: Use vfs_getname probe to get syscall args filenames : Ok 66: Add vfs_getname probe to get syscall args filenames : Ok 67: Check open filename arg using perf trace + vfs_getname: Ok # Cc: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
f712a86c14
commit
03fa483821
1 changed files with 2 additions and 1 deletions
|
|
@ -13,7 +13,8 @@ add_probe_vfs_getname() {
|
|||
local verbose=$1
|
||||
if [ $had_vfs_getname -eq 1 ] ; then
|
||||
line=$(perf probe -L getname_flags 2>&1 | egrep 'result.*=.*filename;' | sed -r 's/[[:space:]]+([[:digit:]]+)[[:space:]]+result->uptr.*/\1/')
|
||||
perf probe $verbose "vfs_getname=getname_flags:${line} pathname=result->name:string"
|
||||
perf probe -q "vfs_getname=getname_flags:${line} pathname=result->name:string" || \
|
||||
perf probe $verbose "vfs_getname=getname_flags:${line} pathname=filename:string"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue