lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <m38vyp85qv.fsf@gmail.com>
Date:	Thu, 13 Jan 2011 11:20:24 +0100
From:	Franck Bui-Huu <vagabon.xyz@...il.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] perf-probe: make "perf-probe -L <function>" display the absolute path and absolute line number

From: Franck Bui-Huu <fbuihuu@...il.com>

It should be more usefull to get the full location of the function
(absolute line number + full path) instead of repeating the name of
the function and the start line number given by the command line.

So we had before:

   $ perf probe -L schedule | head -n3
   <schedule:0>
         0  asmlinkage void __sched schedule(void)
         1  {

and now we get:

   $ perf probe -L schedule | head -n3
   </usr/src/debug/kernel-2.6.35.fc14/linux-2.6.35.x86_64/kernel/sched.c:3813>
         0  asmlinkage void __sched schedule(void)
         1  {

Signed-off-by: Franck Bui-Huu <fbuihuu@...il.com>
---
 tools/perf/util/probe-event.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index fcbb543..bd09b87 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -382,11 +382,7 @@ int show_line_range(struct line_range *lr, const char *module)
 
 	setup_pager();
 
-	if (lr->function)
-		fprintf(stdout, "<%s:%d>\n", lr->function,
-			lr->start - lr->offset);
-	else
-		fprintf(stdout, "<%s:%d>\n", lr->path, lr->start);
+	fprintf(stdout, "<%s:%d>\n", lr->path, lr->start);
 
 	fp = fopen(lr->path, "r");
 	if (fp == NULL) {
-- 
1.7.3.2
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ