From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 05/15] perf tools: Fix truncated annotation
Date: Fri, 23 Dec 2011 19:53:08 -0200 [thread overview]
Message-ID: <1324677198-5191-6-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1324677198-5191-1-git-send-email-acme@infradead.org>
From: Ingo Molnar <mingo@elte.hu>
I get such truncated annotation results in 'perf top':
: Disassembly of section .text: ▒
: ▒
: ffffffff810966a8 <nr_iowait_cpu>: ▒
4.94 : ffffffff810966a8: movslq %edi,%rdi ▒
3.70 : ffffffff810966ab: mov $0x13700,%rax ▒
0.00 : ffffffff810966b2: add -0x7e32cb00(,%rdi,8),%rax ▒
8.64 : ffffffff810966ba: mov 0x7e0(%rax),%eax ▒
82.72 : ffffffff810966c0: cltq ▒
Note the missing 'retq' which is there in the original function:
ffffffff810966a8 <nr_iowait_cpu>:
ffffffff810966a8: 48 63 ff movslq %edi,%rdi
ffffffff810966ab: 48 c7 c0 00 37 01 00 mov $0x13700,%rax
ffffffff810966b2: 48 03 04 fd 00 35 cd add -0x7e32cb00(,%rdi,8),%rax
ffffffff810966b9: 81
ffffffff810966ba: 8b 80 e0 07 00 00 mov 0x7e0(%rax),%eax
ffffffff810966c0: 48 98 cltq
ffffffff810966c2: c3 retq
ffffffff810966c3 <this_cpu_load>:
I'm using a fairly recent binutils:
GNU objdump version 2.21.51.0.6-2.fc16 20110118
AFAICS the bug is simply that sym->end points to the last byte
of the symbol in question - while objdump's --stop-address
expects the last byte plus 1 to disassemble the full range.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111223130804.GA24305@elte.hu
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 376e643..011ed26 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -334,7 +334,7 @@ fallback:
disassembler_style ? "-M " : "",
disassembler_style ? disassembler_style : "",
map__rip_2objdump(map, sym->start),
- map__rip_2objdump(map, sym->end),
+ map__rip_2objdump(map, sym->end+1),
symbol_conf.annotate_asm_raw ? "" : "--no-show-raw",
symbol_conf.annotate_src ? "-S" : "",
symfs_filename, filename);
--
1.7.8.rc0.35.gee6df
next prev parent reply other threads:[~2011-12-23 21:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 21:53 [GIT PULL 00/15] perf/core improvements and fixes Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 01/15] perf report: Fix usage string Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 02/15] perf tools: Fix comm for processes with named threads Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 03/15] perf tools: Look up thread names for system wide profiling Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 04/15] perf script: look up thread using tid instead of pid Arnaldo Carvalho de Melo
2011-12-23 21:53 ` Arnaldo Carvalho de Melo [this message]
2011-12-23 21:53 ` [PATCH 06/15] perf: builtin-record: Provide advice if mmap'ing fails with EPERM Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 07/15] perf: builtin-record: Document and check that mmap_pages must be a power of two Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 08/15] perf tools: Improve macros for struct feature_ops Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 09/15] perf tools: Continue processing header on unknown features Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 10/15] perf tools: Fix out-of-bound access to struct perf_session Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 11/15] perf tools: Moving code in some files Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 12/15] perf report: Accept fifos as input file Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 13/15] perf tools: Unify handling of features when writing feature section Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 14/15] perf tools: Use for_each_set_bit() to iterate over feature flags Arnaldo Carvalho de Melo
2011-12-23 21:53 ` [PATCH 15/15] perf script: Add generic perl handler to process events Arnaldo Carvalho de Melo
2011-12-29 20:28 ` [GIT PULL 00/15] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324677198-5191-6-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).