From: Masami Hiramatsu <mhiramat@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH v2 4/4] perf-probe: Ignore vmlinux Build-id when offline vmlinux given
Date: Fri, 26 Aug 2016 23:57:58 +0900 [thread overview]
Message-ID: <147222347320.5088.2582658035296667520.stgit@devbox> (raw)
In-Reply-To: <147214224523.23638.10155676067678947950.stgit@devbox>
In-Reply-To: <147214224523.23638.10155676067678947950.stgit@devbox>
Ignore vmlinux build-id when user gives offline vmlinux if
the command does not affect running kernel.
perf-probe has several actions some of them does not change
the running kernel, like --lines, --vars, and --funcs.
e.g.
-----
$ ./perf probe -k ./vmlinux-arm -V do_sys_open:14
Available variables at do_sys_open:14
@<do_sys_open+202>
char* filename
int dfd
int fd
int flags
struct filename* tmp
struct open_flags op
umode_t mode
-----
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
tools/perf/builtin-probe.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index b4220cd..f87996b 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -611,6 +611,14 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
*/
symbol_conf.try_vmlinux_path = (symbol_conf.vmlinux_name == NULL);
+ /*
+ * Except for --list, --del and --add, other command doesn't depend
+ * nor change running kernel. So if user gives offline vmlinux,
+ * ignore its buildid.
+ */
+ if (!strchr("lda", params.command) && symbol_conf.vmlinux_name)
+ symbol_conf.ignore_vmlinux_buildid = true;
+
switch (params.command) {
case 'l':
if (params.uprobes) {
@@ -655,13 +663,6 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
}
break;
case 'D':
- /*
- * If user gives offline vmlinux, ignore buildid, since
- * --definition doesn't change running kernel.
- */
- if (symbol_conf.vmlinux_name)
- symbol_conf.ignore_vmlinux_buildid = true;
- /* fall through */
case 'a':
/* Ensure the last given target is used */
next prev parent reply other threads:[~2016-08-26 14:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 16:24 [PATCH v2 0/3] perf probe: Introduce remote cross-arch probes Masami Hiramatsu
2016-08-25 16:24 ` [PATCH v2 1/3] perf-probe: Show trace event definition Masami Hiramatsu
2016-09-05 13:22 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2016-08-25 16:24 ` [PATCH v2 2/3] perf-probe: Ignore vmlinux buildid if offline kernel is given Masami Hiramatsu
2016-08-26 14:02 ` Masami Hiramatsu
2016-09-05 13:22 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2016-08-25 16:24 ` [PATCH v2 3/3] perf-probe: Support probing on offline cross-arch binary Masami Hiramatsu
2016-08-31 20:54 ` Arnaldo Carvalho de Melo
2016-08-31 23:25 ` Masami Hiramatsu
2016-09-09 14:37 ` [BUG] " Arnaldo Carvalho de Melo
2016-09-09 14:59 ` [BUGFIX] " Arnaldo Carvalho de Melo
2016-09-09 15:28 ` Masami Hiramatsu
2016-09-09 15:43 ` Arnaldo Carvalho de Melo
2016-09-05 13:23 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2016-08-26 14:57 ` Masami Hiramatsu [this message]
2016-09-05 13:23 ` [tip:perf/core] perf probe: Ignore vmlinux Build-id when offline vmlinux given tip-bot for Masami Hiramatsu
2016-08-31 1:01 ` [PATCH v2 0/3] perf probe: Introduce remote cross-arch probes Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147222347320.5088.2582658035296667520.stgit@devbox \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.