mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
perf annotate: Show invalid jump offset in error message
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 <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
9484b86e9c
commit
5252b1aeab
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue