Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754454Ab1BJJP3 (ORCPT ); Thu, 10 Feb 2011 04:15:29 -0500 Received: from mail9.hitachi.co.jp ([133.145.228.44]:58040 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754058Ab1BJJP0 (ORCPT ); Thu, 10 Feb 2011 04:15:26 -0500 X-AuditID: b753bd60-a46baba000004916-e2-4d53acacde02 X-AuditID: b753bd60-a46baba000004916-e2-4d53acacde02 From: Masami Hiramatsu Subject: [PATCH -perf/perf/core 2/2] perf probe: Show filename which contains target function To: Arnaldo Carvalho de Melo , Ingo Molnar Cc: Franck Bui-Huu , linux-kernel@vger.kernel.org, 2nddept-manager@sdl.hitachi.co.jp, Masami Hiramatsu , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org Date: Thu, 10 Feb 2011 18:08:16 +0900 Message-ID: <20110210090816.1809.43426.stgit@ltc236.sdl.hitachi.co.jp> In-Reply-To: <20110210090754.1809.36678.stgit@ltc236.sdl.hitachi.co.jp> References: <20110210090754.1809.36678.stgit@ltc236.sdl.hitachi.co.jp> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1985 Lines: 56 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 0 static int t_show(struct seq_file *m, void *v) 1 { 2 struct ftrace_iterator *iter = m->private; ... $ perf probe -L t_show@trace/trace.c 0 static int t_show(struct seq_file *m, void *v) 1 { struct tracer *t = v; ... Signed-off-by: Masami Hiramatsu Original-patch-by: Franck Bui-Huu Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/