Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1596236

[PATCH v3 4/7] perf annotate: More exactly grep -v in symbol__disassemble()

From Taeung Song <treeze.taeung@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v3 4/7] perf annotate: More exactly grep -v in symbol__disassemble()
Date 2017-03-09 18:40 +0100
Message-ID <tjacG-8oc-5@gated-at.bofh.it> (permalink)
References <tjacG-8oc-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


To remove the first line containing file name and file format as below,

    $ objdump -l -d -S -C /home/taeung/a.out | head -2

    /home/taeung/a.out:     file format elf64-x86-64

currently perf-annotate use objdump with grep -v "file name".
But it cause a side effect eliminating filename:linenr of
output of 'objdump -l' so fix it.

Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 tools/perf/util/annotate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 63130ec..e49eb7e 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1443,7 +1443,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
 	snprintf(command, sizeof(command),
 		 "%s %s%s --start-address=0x%016" PRIx64
 		 " --stop-address=0x%016" PRIx64
-		 " -l -d %s %s -C %s 2>/dev/null|grep -v %s|expand",
+		 " -l -d %s %s -C %s 2>/dev/null|grep -v %s: |expand",
 		 objdump_path ? objdump_path : "objdump",
 		 disassembler_style ? "-M " : "",
 		 disassembler_style ? disassembler_style : "",
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v3 4/7] perf annotate: More exactly grep -v in symbol__disassemble() Taeung Song <treeze.taeung@gmail.com> - 2017-03-09 18:40 +0100

csiph-web