mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf annotate browser: The idx_asm field should be used in asm only view
When hide_src_view is true we can't use browser_disasm_line->idx, that takes into account also non asm lines, we must use browser_disasm_line->idx_asm instead, otherwise we may end up with an index after the number of entries, oops, fix it. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[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
3780f4883b
commit
a44b45f236
1 changed files with 5 additions and 1 deletions
|
|
@ -300,10 +300,14 @@ static void annotate_browser__set_rb_top(struct annotate_browser *browser,
|
|||
{
|
||||
struct browser_disasm_line *bpos;
|
||||
struct disasm_line *pos;
|
||||
u32 idx;
|
||||
|
||||
bpos = rb_entry(nd, struct browser_disasm_line, rb_node);
|
||||
pos = ((struct disasm_line *)bpos) - 1;
|
||||
annotate_browser__set_top(browser, pos, bpos->idx);
|
||||
idx = bpos->idx;
|
||||
if (browser->hide_src_code)
|
||||
idx = bpos->idx_asm;
|
||||
annotate_browser__set_top(browser, pos, idx);
|
||||
browser->curr_hot = nd;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue