summaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-05-30 08:59:31 +0200
committerIngo Molnar <mingo@kernel.org>2012-05-30 09:01:40 +0200
commit55b78e34b12d07b8ab7d7732fd24892df8eea5c7 (patch)
treedead7017e67403bdae20db5f2a3a409af9eea7d3 /tools/perf/ui/browsers/annotate.c
parentc985f7812331d79483beab932e8966477411a942 (diff)
parenta44b45f236dd1c1a8caccf9a078adf2941a20267 (diff)
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Fixes for perf/urgent from Arnaldo Carvalho de Melo: * Fix fallback to --stdio when TUI not supported, from Namhyung Kim. * Use right cast for pointers/long in libtraceevent, from Namhyung Kim. * Be consistent on using the right error reporting interface for fatal errors, from Namhyung Kim. * Fix fallback to --stdio when TUI not supported, from Namhyung Kim. * Use the right index in asm only view in the annotate browser. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-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 6e0ef79be16..aaf36ce0b6f 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,
{
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;
}