Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443125
| From | tip-bot for Masami Hiramatsu <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf probe: Fix to show correct error message for $vars and $params |
| Date | 2016-07-14 09:10 +0200 |
| Message-ID | <rUIWu-6o9-37@gated-at.bofh.it> (permalink) |
| References | <rU2NB-3tA-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: f6eb0518f325ef0d6557fbef5c7ebe48a81e74db
Gitweb: http://git.kernel.org/tip/f6eb0518f325ef0d6557fbef5c7ebe48a81e74db
Author: Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Tue, 12 Jul 2016 19:04:34 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 13 Jul 2016 23:09:04 -0300
perf probe: Fix to show correct error message for $vars and $params
Fix to show correct error messages for $vars and $params because
those special variables requires debug information to find the
real variables or function parameters.
E.g. without this fix;
----
# perf probe -x /lib64/libc-2.23.so getaddrinfo \$params
Failed to write event: Invalid argument
Please upgrade your kernel to at least 3.14 to have access to feature $params
Error: Failed to add events.
----
Perf ends up with an error, but the message is not correct. With this
fix, perf shows correct error message as below.
----
# perf probe -x /lib64/libc-2.23.so getaddrinfo \$params
The /usr/lib64/libc-2.23.so file has no debug information.
Rebuild with -g, or install an appropriate debuginfo package.
Error: Failed to add events.
----
Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/146831787438.17065.6152436996780110699.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 2b222a7..fef9768 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1547,7 +1547,9 @@ bool perf_probe_event_need_dwarf(struct perf_probe_event *pev)
return true;
for (i = 0; i < pev->nargs; i++)
- if (is_c_varname(pev->args[i].var))
+ if (is_c_varname(pev->args[i].var) ||
+ !strcmp(pev->args[i].var, "$params") ||
+ !strcmp(pev->args[i].var, "$vars"))
return true;
return false;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH perf/core 00/10] perf-probe --cache and SDT support Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
[PATCH perf/core 03/10] perf-probe: Make --list shows only available cached events Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
Re: [PATCH perf/core 03/10] perf-probe: Make --list shows only available cached events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-13 21:30 +0200
Re: [PATCH perf/core 03/10] perf-probe: Make --list shows only available cached events Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-14 08:20 +0200
[tip:perf/core] perf probe: Make --list show only available cached events tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:10 +0200
[PATCH perf/core 10/10] perf-test: Add a test case for SDT event Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
[tip:perf/core] perf test: Add a test case for SDT event tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:20 +0200
[PATCH perf/core 09/10] perf build: Add sdt feature detection Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
[tip:perf/core] perf build: Add sdt feature detection tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:20 +0200
[PATCH perf/core 01/10] [BUGFIX] perf-probe: Fix to show correct error message for $vars and $params Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
[tip:perf/core] perf probe: Fix to show correct error message for $vars and $params tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:10 +0200
[PATCH perf/core 07/10] perf probe: Support @BUILDID or @FILE suffix for SDT events Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
Re: [PATCH perf/core 07/10] perf probe: Support @BUILDID or @FILE suffix for SDT events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-13 22:00 +0200
Re: [PATCH perf/core 07/10] perf probe: Support @BUILDID or @FILE suffix for SDT events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-14 02:10 +0200
Re: [PATCH perf/core 07/10] perf probe: Support @BUILDID or @FILE suffix for SDT events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-14 02:20 +0200
Re: [PATCH perf/core 07/10] perf probe: Support @BUILDID or @FILE suffix for SDT events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-14 02:30 +0200
Re: [PATCH perf/core 07/10] perf probe: Support @BUILDID or @FILE suffix for SDT events Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-14 17:40 +0200
[tip:perf/core] perf probe: Support @BUILDID or @FILE suffix for SDT events tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:10 +0200
[PATCH perf/core 08/10] perf probe: Support a special SDT probe format Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
[tip:perf/core] perf probe: Support a special SDT probe format tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:10 +0200
[PATCH perf/core 05/10] perf probe: Allow wildcard for cached events Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
Re: [PATCH perf/core 05/10] perf probe: Allow wildcard for cached events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-13 21:40 +0200
[tip:perf/core] perf probe: Allow wildcard for cached events tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:10 +0200
[PATCH perf/core 02/10] perf probe: Accept %sdt and %cached event name Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-12 12:10 +0200
[tip:perf/core] perf probe: Accept %sdt and %cached event name tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-07-14 09:10 +0200
Re: [PATCH perf/core 00/10] perf-probe --cache and SDT support Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-14 03:40 +0200
csiph-web