From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759346Ab2D0IiP (ORCPT ); Fri, 27 Apr 2012 04:38:15 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34368 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753985Ab2D0IiL (ORCPT ); Fri, 27 Apr 2012 04:38:11 -0400 Date: Fri, 27 Apr 2012 01:37:26 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: linux-kernel@vger.kernel.org, eranian@google.com, paulus@samba.org, acme@redhat.com, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, efault@gmx.de, namhyung@gmail.com, fweisbec@gmail.com, dsahern@gmail.com, tglx@linutronix.de Reply-To: mingo@kernel.org, hpa@zytor.com, acme@redhat.com, paulus@samba.org, eranian@google.com, linux-kernel@vger.kernel.org, efault@gmx.de, peterz@infradead.org, namhyung@gmail.com, fweisbec@gmail.com, dsahern@gmail.com, tglx@linutronix.de To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf annotate browser: Bandaid offsets/ jump label objdump ambiguity Git-Commit-ID: 97148a97baf71536e15aa0acf3310b7b1409e2f4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Fri, 27 Apr 2012 01:37:31 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 97148a97baf71536e15aa0acf3310b7b1409e2f4 Gitweb: http://git.kernel.org/tip/97148a97baf71536e15aa0acf3310b7b1409e2f4 Author: Arnaldo Carvalho de Melo AuthorDate: Fri, 20 Apr 2012 15:17:50 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 20 Apr 2012 15:17:50 -0300 perf annotate browser: Bandaid offsets/jump label objdump ambiguity We need to cope with things like: $ objdump -d --no-show-raw -S -C /lib/modules/3.4.0-rc2+/build/vmlinux ffffffff8125ec60 : * Output: * eax uncopied bytes or 0 if successful. */ ENTRY(copy_user_generic_unrolled) CFI_STARTPROC cmpl $8,%edx ffffffff8125ec60: cmp $0x8,%edx jb 20f /* less then 8 bytes, go to byte copy loop */ ffffffff8125ec63: jb ffffffff8125ecf5 ALIGN_DESTINATION ffffffff8125ec8d: je ffffffff8125ecd9 1: movq (%rsi),%r8 ffffffff8125ec8f: mov (%rsi),%r8 2: movq 1*8(%rsi),%r9 ffffffff8125ec92: mov 0x8(%rsi),%r9 3: movq 2*8(%rsi),%r10 ffffffff8125ec96: mov 0x10(%rsi),%r10 4: movq 3*8(%rsi),%r11 Probably expect that the length of the addr field be the same... Lazy move for now, back to supporting suppressing the address on callq lines... Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-7hp85vnvowpqj8799f8rxbu1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/browsers/annotate.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 9c7b6d8..c2bbfc7 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -690,7 +690,15 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx, bpos->idx = browser.nr_entries++; if (pos->offset != -1) { bpos->idx_asm = browser.nr_asm_entries++; - browser.offsets[pos->offset] = pos; + /* + * FIXME: short term bandaid to cope with assembly + * routines that comes with labels in the same column + * as the address in objdump, sigh. + * + * E.g. copy_user_generic_unrolled + */ + if (pos->offset < (s64)size) + browser.offsets[pos->offset] = pos; } else bpos->idx_asm = -1; }