Messages in this thread Patch in this message | | | From | Taeung Song <> | Subject | [PATCH v3 4/7] perf annotate: More exactly grep -v in symbol__disassemble() | Date | Fri, 10 Mar 2017 02:35:38 +0900 |
| |
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
| |