From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 02/19] perf annotate: Show invalid jump offset in error message
Date: Thu, 1 Dec 2016 15:02:18 -0300 [thread overview]
Message-ID: <20161201180235.18392-3-acme@kernel.org> (raw)
In-Reply-To: <20161201180235.18392-1-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To help in debugging when the wrong offset is being used, like in:
│13d98: ↓ jne 13dd1 <lzma_lzma_preset@@XZ_5.0+0x28e1>
That is the full line from objdump, and it seems what should be used is
13dd1, not 28e1.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-4nc0marsgst1ft6inmvqber7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/browsers/annotate.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index cee0eee31ce6..ec7a30fad149 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -543,14 +543,16 @@ struct disasm_line *annotate_browser__find_offset(struct annotate_browser *brows
static bool annotate_browser__jump(struct annotate_browser *browser)
{
struct disasm_line *dl = browser->selection;
+ u64 offset;
s64 idx;
if (!ins__is_jump(&dl->ins))
return false;
- dl = annotate_browser__find_offset(browser, dl->ops.target.offset, &idx);
+ offset = dl->ops.target.offset;
+ dl = annotate_browser__find_offset(browser, offset, &idx);
if (dl == NULL) {
- ui_helpline__puts("Invalid jump offset");
+ ui_helpline__printf("Invalid jump offset: %" PRIx64, offset);
return true;
}
--
2.9.3
next prev parent reply other threads:[~2016-12-01 18:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 18:02 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 01/19] perf ui helpline: Provide a printf variant Arnaldo Carvalho de Melo
2016-12-01 18:02 ` Arnaldo Carvalho de Melo [this message]
2016-12-01 18:02 ` [PATCH 03/19] perf sched timehist: Handle cpu migration events Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 04/19] perf trace: Update tid/pid filtering option to leverage symbol_conf Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 05/19] tools lib bpf: Add missing BPF functions Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 06/19] tools lib bpf: Add private field for bpf_object Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 07/19] tools lib bpf: Retrive bpf_map through offset of bpf_map_def Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 08/19] perf tools: Introduce perf hooks Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 09/19] perf test: Remove "test" and similar strings from test descriptions Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 10/19] perf kmem stat: Track memory freed Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 11/19] perf script: Add option to stop printing callchain Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 12/19] perf tools: Add time-based utility functions Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 13/19] perf tools: Move parse_nsec_time to time-utils.c Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 14/19] perf script: Add option to specify time window of interest Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 15/19] perf sched timehist: " Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 16/19] perf kmem: " Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 17/19] perf report: " Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 18/19] perf annotate: Use arch->objdump.comment_char in dec__parse() Arnaldo Carvalho de Melo
2016-12-01 18:02 ` [PATCH 19/19] perf annotate: AArch64 support Arnaldo Carvalho de Melo
2016-12-02 9:10 ` [GIT PULL 00/19] 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=20161201180235.18392-3-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=wangnan0@huawei.com \
/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).