aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2009-12-15 10:31:35 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-15 14:22:01 -0500
commit411edfe5c1ef02a62ec3be56d3e234dbed71ba20 (patch)
treed18c74915fad63f8e5fbbb300ae6e596fcb677b1 /tools/perf/builtin-probe.c
parentce11a603ae40e0ad32aeb378cff81e3fdaec390d (diff)
perf probe: Show need-dwarf message only if it is really needed
Show need-dwarf message only if the probe is really requires debuginfo analysis. This also use pr_debug for debugging message instead of pr_warning. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Frank Ch. Eigler <fche@redhat.com> Cc: Jason Baron <jbaron@redhat.com> Cc: K.Prasad <prasad@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20091215153135.17436.99052.stgit@dhcp-100-2-132.bos.redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r--tools/perf/builtin-probe.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 919037bc980..438a7bb101d 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -261,15 +261,19 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
261 261
262 lseek(fd, SEEK_SET, 0); 262 lseek(fd, SEEK_SET, 0);
263 ret = find_probepoint(fd, pp); 263 ret = find_probepoint(fd, pp);
264 if (ret < 0) { 264 if (ret > 0)
265 if (session.need_dwarf) 265 continue;
266 die("Could not analyze debuginfo.");
267
268 pr_warning("An error occurred in debuginfo analysis. Try to use symbols.\n");
269 break;
270 }
271 if (ret == 0) /* No error but failed to find probe point. */ 266 if (ret == 0) /* No error but failed to find probe point. */
272 die("No probe point found."); 267 die("No probe point found.");
268 /* Error path */
269 if (session.need_dwarf) {
270 if (ret == -ENOENT)
271 pr_warning("No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO=y.\n");
272 die("Could not analyze debuginfo.");
273 }
274 pr_debug("An error occurred in debuginfo analysis."
275 " Try to use symbols.\n");
276 break;
273 } 277 }
274 close(fd); 278 close(fd);
275 279