From: Greg Kroah-Hartman Date: Wed, 13 Mar 2019 20:50:29 +0000 (-0700) Subject: drop perf-trace-support-multiple-vfs_getname-probes.patch from 4.4 and 4.9 queues X-Git-Tag: v5.0.2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=339c2ec0fadd896456b4703eeca7bd9a5b949ffc;p=thirdparty%2Fkernel%2Fstable-queue.git drop perf-trace-support-multiple-vfs_getname-probes.patch from 4.4 and 4.9 queues it breaks the build. --- diff --git a/queue-4.4/perf-trace-support-multiple-vfs_getname-probes.patch b/queue-4.4/perf-trace-support-multiple-vfs_getname-probes.patch deleted file mode 100644 index d703a2f6491..00000000000 --- a/queue-4.4/perf-trace-support-multiple-vfs_getname-probes.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 2c5947ff54f89f7b46d25d6d73476037af4a9256 Mon Sep 17 00:00:00 2001 -From: Arnaldo Carvalho de Melo -Date: Tue, 29 Jan 2019 15:12:34 +0100 -Subject: perf trace: Support multiple "vfs_getname" probes - -[ Upstream commit 6ab3bc240ade47a0f52bc16d97edd9accbe0024e ] - -With a suitably defined "probe:vfs_getname" probe, 'perf trace' can -"beautify" its output, so syscalls like open() or openat() can print the -"filename" argument instead of just its hex address, like: - - $ perf trace -e open -- touch /dev/null - [...] - 0.590 ( 0.014 ms): touch/18063 open(filename: /dev/null, flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 3 - [...] - -The output without such beautifier looks like: - - 0.529 ( 0.011 ms): touch/18075 open(filename: 0xc78cf288, flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 3 - -However, when the vfs_getname probe expands to multiple probes and it is -not the first one that is hit, the beautifier fails, as following: - - 0.326 ( 0.010 ms): touch/18072 open(filename: , flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 3 - -Fix it by hooking into all the expanded probes (inlines), now, for instance: - - [root@quaco ~]# perf probe -l - probe:vfs_getname (on getname_flags:73@fs/namei.c with pathname) - probe:vfs_getname_1 (on getname_flags:73@fs/namei.c with pathname) - [root@quaco ~]# perf trace -e open* sleep 1 - 0.010 ( 0.005 ms): sleep/5588 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: RDONLY|CLOEXEC) = 3 - 0.029 ( 0.006 ms): sleep/5588 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: RDONLY|CLOEXEC) = 3 - 0.194 ( 0.008 ms): sleep/5588 openat(dfd: CWD, filename: /usr/lib/locale/locale-archive, flags: RDONLY|CLOEXEC) = 3 - [root@quaco ~]# - -Works, further verified with: - - [root@quaco ~]# perf test vfs - 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 - [root@quaco ~]# - -Reported-by: Michael Petlan -Tested-by: Michael Petlan -Cc: Adrian Hunter -Cc: Jiri Olsa -Cc: Namhyung Kim -Link: https://lkml.kernel.org/n/tip-mv8kolk17xla1smvmp3qabv1@git.kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-trace.c | 25 ++++++++++++++++++------- - 1 file changed, 18 insertions(+), 7 deletions(-) - -diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c -index da8afc121118..039517c61c75 100644 ---- a/tools/perf/builtin-trace.c -+++ b/tools/perf/builtin-trace.c -@@ -2403,19 +2403,30 @@ static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp); - - static bool perf_evlist__add_vfs_getname(struct perf_evlist *evlist) - { -- struct perf_evsel *evsel = perf_evsel__newtp("probe", "vfs_getname"); -+ bool found = false; -+ struct perf_evsel *evsel, *tmp; -+ struct parse_events_error err = { .idx = 0, }; -+ int ret = parse_events(evlist, "probe:vfs_getname*", &err); - -- if (IS_ERR(evsel)) -+ if (ret) - return false; - -- if (perf_evsel__field(evsel, "pathname") == NULL) { -+ evlist__for_each_entry_safe(evlist, evsel, tmp) { -+ if (!strstarts(perf_evsel__name(evsel), "probe:vfs_getname")) -+ continue; -+ -+ if (perf_evsel__field(evsel, "pathname")) { -+ evsel->handler = trace__vfs_getname; -+ found = true; -+ continue; -+ } -+ -+ list_del_init(&evsel->node); -+ evsel->evlist = NULL; - perf_evsel__delete(evsel); -- return false; - } - -- evsel->handler = trace__vfs_getname; -- perf_evlist__add(evlist, evsel); -- return true; -+ return found; - } - - static int perf_evlist__add_pgfault(struct perf_evlist *evlist, --- -2.19.1 - diff --git a/queue-4.4/series b/queue-4.4/series index cfc8207370a..be313f1fbfa 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -109,7 +109,6 @@ dmaengine-at_xdmac-fix-wrongfull-report-of-a-channel.patch dmaengine-dmatest-abort-test-in-case-of-mapping-erro.patch s390-qeth-fix-use-after-free-in-error-path.patch perf-symbols-filter-out-hidden-symbols-from-labels.patch -perf-trace-support-multiple-vfs_getname-probes.patch mips-remove-function-size-check-in-get_frame_info.patch input-wacom_serial4-add-support-for-wacom-artpad-ii-tablet.patch input-elan_i2c-add-id-for-touchpad-found-in-lenovo-s21e-20.patch diff --git a/queue-4.9/perf-trace-support-multiple-vfs_getname-probes.patch b/queue-4.9/perf-trace-support-multiple-vfs_getname-probes.patch deleted file mode 100644 index e61581f367e..00000000000 --- a/queue-4.9/perf-trace-support-multiple-vfs_getname-probes.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 5cc31b3875f48286a9e60f4362898bf9533c2199 Mon Sep 17 00:00:00 2001 -From: Arnaldo Carvalho de Melo -Date: Tue, 29 Jan 2019 15:12:34 +0100 -Subject: perf trace: Support multiple "vfs_getname" probes - -[ Upstream commit 6ab3bc240ade47a0f52bc16d97edd9accbe0024e ] - -With a suitably defined "probe:vfs_getname" probe, 'perf trace' can -"beautify" its output, so syscalls like open() or openat() can print the -"filename" argument instead of just its hex address, like: - - $ perf trace -e open -- touch /dev/null - [...] - 0.590 ( 0.014 ms): touch/18063 open(filename: /dev/null, flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 3 - [...] - -The output without such beautifier looks like: - - 0.529 ( 0.011 ms): touch/18075 open(filename: 0xc78cf288, flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 3 - -However, when the vfs_getname probe expands to multiple probes and it is -not the first one that is hit, the beautifier fails, as following: - - 0.326 ( 0.010 ms): touch/18072 open(filename: , flags: CREAT|NOCTTY|NONBLOCK|WRONLY, mode: IRUGO|IWUGO) = 3 - -Fix it by hooking into all the expanded probes (inlines), now, for instance: - - [root@quaco ~]# perf probe -l - probe:vfs_getname (on getname_flags:73@fs/namei.c with pathname) - probe:vfs_getname_1 (on getname_flags:73@fs/namei.c with pathname) - [root@quaco ~]# perf trace -e open* sleep 1 - 0.010 ( 0.005 ms): sleep/5588 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: RDONLY|CLOEXEC) = 3 - 0.029 ( 0.006 ms): sleep/5588 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: RDONLY|CLOEXEC) = 3 - 0.194 ( 0.008 ms): sleep/5588 openat(dfd: CWD, filename: /usr/lib/locale/locale-archive, flags: RDONLY|CLOEXEC) = 3 - [root@quaco ~]# - -Works, further verified with: - - [root@quaco ~]# perf test vfs - 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 - [root@quaco ~]# - -Reported-by: Michael Petlan -Tested-by: Michael Petlan -Cc: Adrian Hunter -Cc: Jiri Olsa -Cc: Namhyung Kim -Link: https://lkml.kernel.org/n/tip-mv8kolk17xla1smvmp3qabv1@git.kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-trace.c | 25 ++++++++++++++++++------- - 1 file changed, 18 insertions(+), 7 deletions(-) - -diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c -index 0fd8bfb77f65..6e568d361edf 100644 ---- a/tools/perf/builtin-trace.c -+++ b/tools/perf/builtin-trace.c -@@ -2059,19 +2059,30 @@ static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp); - - static bool perf_evlist__add_vfs_getname(struct perf_evlist *evlist) - { -- struct perf_evsel *evsel = perf_evsel__newtp("probe", "vfs_getname"); -+ bool found = false; -+ struct perf_evsel *evsel, *tmp; -+ struct parse_events_error err = { .idx = 0, }; -+ int ret = parse_events(evlist, "probe:vfs_getname*", &err); - -- if (IS_ERR(evsel)) -+ if (ret) - return false; - -- if (perf_evsel__field(evsel, "pathname") == NULL) { -+ evlist__for_each_entry_safe(evlist, evsel, tmp) { -+ if (!strstarts(perf_evsel__name(evsel), "probe:vfs_getname")) -+ continue; -+ -+ if (perf_evsel__field(evsel, "pathname")) { -+ evsel->handler = trace__vfs_getname; -+ found = true; -+ continue; -+ } -+ -+ list_del_init(&evsel->node); -+ evsel->evlist = NULL; - perf_evsel__delete(evsel); -- return false; - } - -- evsel->handler = trace__vfs_getname; -- perf_evlist__add(evlist, evsel); -- return true; -+ return found; - } - - static struct perf_evsel *perf_evsel__new_pgfault(u64 config) --- -2.19.1 - diff --git a/queue-4.9/series b/queue-4.9/series index c7dddb09a6d..8aeaac62161 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -77,7 +77,6 @@ selftests-netfilter-add-simple-masq-redirect-test-ca.patch netfilter-nf_nat-skip-nat-clash-resolution-for-same-.patch s390-qeth-fix-use-after-free-in-error-path.patch perf-symbols-filter-out-hidden-symbols-from-labels.patch -perf-trace-support-multiple-vfs_getname-probes.patch mips-loongson-introduce-and-use-loongson_llsc_mb.patch mips-remove-function-size-check-in-get_frame_info.patch fs-ratelimit-__find_get_block_slow-failure-message.patch