summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-finder.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2009-10-16 20:08:10 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-17 09:54:00 +0200
commit89c69c0eee7515cdc217f4278de43547284b3458 (patch)
tree914114cca2d004e7e22093a32b91540cd9beb1cc /tools/perf/util/probe-finder.c
parent074fc0e4b3f5d24306c2995f2f3b0bd4759e8aeb (diff)
downloadop-kernel-dev-89c69c0eee7515cdc217f4278de43547284b3458.zip
op-kernel-dev-89c69c0eee7515cdc217f4278de43547284b3458.tar.gz
perf: Use eprintf() for debug messages in perf-probe
Replace debug() macro with eprintf() and add -v option for showing those messages in perf-probe. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20091017000810.16556.38013.stgit@dhcp-100-2-132.bos.redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-finder.c')
-rw-r--r--tools/perf/util/probe-finder.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 338fdb9..db24c91 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -32,6 +32,8 @@
#include <stdarg.h>
#include <ctype.h>
+#include "event.h"
+#include "debug.h"
#include "util.h"
#include "probe-finder.h"
@@ -134,7 +136,7 @@ static Dwarf_Unsigned die_get_fileno(Dwarf_Die cu_die, const char *fname)
dwarf_dealloc(__dw_debug, srcs, DW_DLA_LIST);
}
if (found)
- debug("found fno: %d\n", (int)found);
+ eprintf("found fno: %d\n", (int)found);
return found;
}
@@ -440,7 +442,7 @@ static void find_variable(Dwarf_Die sp_die, struct probe_finder *pf)
return ;
}
- debug("Searching '%s' variable in context.\n", pf->var);
+ eprintf("Searching '%s' variable in context.\n", pf->var);
/* Search child die for local variables and parameters. */
ret = search_die_from_children(sp_die, variable_callback, pf);
if (!ret)
@@ -550,7 +552,7 @@ static void find_by_line(Dwarf_Die cu_die, struct probe_finder *pf)
ret = dwarf_lineaddr(lines[i], &addr, &__dw_error);
ERR_IF(ret != DW_DLV_OK);
- debug("Probe point found: 0x%llx\n", addr);
+ eprintf("Probe point found: 0x%llx\n", addr);
pf->addr = addr;
/* Search a real subprogram including this line, */
ret = search_die_from_children(cu_die, probeaddr_callback, pf);
@@ -581,7 +583,7 @@ static int probefunc_callback(struct die_link *dlink, void *data)
&pf->inl_offs,
&__dw_error);
ERR_IF(ret != DW_DLV_OK);
- debug("inline definition offset %lld\n",
+ eprintf("inline definition offset %lld\n",
pf->inl_offs);
return 0;
}
@@ -597,7 +599,7 @@ static int probefunc_callback(struct die_link *dlink, void *data)
/* Get probe address */
pf->addr = die_get_entrypc(dlink->die);
pf->addr += pp->offset;
- debug("found inline addr: 0x%llx\n", pf->addr);
+ eprintf("found inline addr: 0x%llx\n", pf->addr);
/* Inlined function. Get a real subprogram */
for (lk = dlink->parent; lk != NULL; lk = lk->parent) {
tag = 0;
OpenPOWER on IntegriCloud