[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110210090816.1809.43426.stgit@ltc236.sdl.hitachi.co.jp>
Date: Thu, 10 Feb 2011 18:08:16 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Arnaldo Carvalho de Melo <acme@...hat.com>,
Ingo Molnar <mingo@...e.hu>
Cc: Franck Bui-Huu <fbuihuu@...il.com>, linux-kernel@...r.kernel.org,
2nddept-manager@....hitachi.co.jp,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
linux-kernel@...r.kernel.org
Subject: [PATCH -perf/perf/core 2/2] perf probe: Show filename which contains
target function
Show filename which contains a target function with the
function name on "--lines" mode, because perf-probe just
shows the first function even if there are many same-name
functions.
Originally adopted by Franck Bui-Huu's patch which shows
file name instead of function name. I've just modified it
to show both of function name and file name, because of
completeness of output.
E.g.)
$ perf probe -L t_show
<t_show@...me/mhiramat/ksrc/linux-2.6-tip/kernel/trace/ftrace.c:0>
0 static int t_show(struct seq_file *m, void *v)
1 {
2 struct ftrace_iterator *iter = m->private;
...
$ perf probe -L t_show@...ce/trace.c
<t_show@...me/mhiramat/ksrc/linux-2.6-tip/kernel/trace/trace.c:0>
0 static int t_show(struct seq_file *m, void *v)
1 {
struct tracer *t = v;
...
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Original-patch-by: Franck Bui-Huu <fbuihuu@...il.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: linux-kernel@...r.kernel.org
---
tools/perf/util/probe-event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index cbd7650..0e3ea13 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -409,7 +409,7 @@ int show_line_range(struct line_range *lr, const char *module)
setup_pager();
if (lr->function)
- fprintf(stdout, "<%s:%d>\n", lr->function,
+ fprintf(stdout, "<%s@%s:%d>\n", lr->function, lr->path,
lr->start - lr->offset);
else
fprintf(stdout, "<%s:%d>\n", lr->path, lr->start);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists