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


Groups > linux.kernel > #1596236 > unrolled thread

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

Started byTaeung Song <treeze.taeung@gmail.com>
First post2017-03-09 18:40 +0100
Last post2017-03-09 18:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [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

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

FromTaeung Song <treeze.taeung@gmail.com>
Date2017-03-09 18:40 +0100
Subject[PATCH v3 4/7] perf annotate: More exactly grep -v in symbol__disassemble()
Message-ID<tjacG-8oc-5@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web