aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-25 13:18:42 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-25 13:18:42 -0400
commit38b31bd0cefbb0e69a182d9a94b09a7e648549dc (patch)
tree74882d00ec6bb6e60ccf936257c5644bb6617475 /tools/perf/ui
parentfb29fa58e36df09c807d252247d64a221fcd5bbb (diff)
perf annotate browser: Don't draw jump connectors for out of function jumps
As described in the previous patch. Next step is to properly label those jumps by using a -> arrow, i.e. not backwards/forwards, and allow the user to navigate to this other function when enter or -> is pressed. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-ax2sss463eu88wgl9ee8a6b6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r--tools/perf/ui/browsers/annotate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 73e1ef0081d4..077380baa1c0 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -153,7 +153,8 @@ static void annotate_browser__draw_current_loop(struct ui_browser *browser)
153 unsigned int from, to, start_width = 2; 153 unsigned int from, to, start_width = 2;
154 154
155 list_for_each_entry_from(pos, &notes->src->source, node) { 155 list_for_each_entry_from(pos, &notes->src->source, node) {
156 if (!pos->ins || !ins__is_jump(pos->ins)) 156 if (!pos->ins || !ins__is_jump(pos->ins) ||
157 !disasm_line__has_offset(pos))
157 continue; 158 continue;
158 159
159 target = ab->offsets[pos->ops.target.offset]; 160 target = ab->offsets[pos->ops.target.offset];
@@ -689,7 +690,8 @@ static void annotate_browser__mark_jump_targets(struct annotate_browser *browser
689 struct disasm_line *dl = browser->offsets[offset], *dlt; 690 struct disasm_line *dl = browser->offsets[offset], *dlt;
690 struct browser_disasm_line *bdlt; 691 struct browser_disasm_line *bdlt;
691 692
692 if (!dl || !dl->ins || !ins__is_jump(dl->ins)) 693 if (!dl || !dl->ins || !ins__is_jump(dl->ins) ||
694 !disasm_line__has_offset(dl))
693 continue; 695 continue;
694 696
695 if (dl->ops.target.offset >= size) { 697 if (dl->ops.target.offset >= size) {