aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/ui/browsers/annotate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 6e0ef79be169..aaf36ce0b6fe 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -300,10 +300,14 @@ static void annotate_browser__set_rb_top(struct annotate_browser *browser,
300{ 300{
301 struct browser_disasm_line *bpos; 301 struct browser_disasm_line *bpos;
302 struct disasm_line *pos; 302 struct disasm_line *pos;
303 u32 idx;
303 304
304 bpos = rb_entry(nd, struct browser_disasm_line, rb_node); 305 bpos = rb_entry(nd, struct browser_disasm_line, rb_node);
305 pos = ((struct disasm_line *)bpos) - 1; 306 pos = ((struct disasm_line *)bpos) - 1;
306 annotate_browser__set_top(browser, pos, bpos->idx); 307 idx = bpos->idx;
308 if (browser->hide_src_code)
309 idx = bpos->idx_asm;
310 annotate_browser__set_top(browser, pos, idx);
307 browser->curr_hot = nd; 311 browser->curr_hot = nd;
308} 312}
309 313