Skip to content

Commit 38b31bd

Browse files
committed
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 <[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]>
1 parent fb29fa5 commit 38b31bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/perf/ui/browsers/annotate.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ static void annotate_browser__draw_current_loop(struct ui_browser *browser)
153153
unsigned int from, to, start_width = 2;
154154

155155
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))
157158
continue;
158159

159160
target = ab->offsets[pos->ops.target.offset];
@@ -689,7 +690,8 @@ static void annotate_browser__mark_jump_targets(struct annotate_browser *browser
689690
struct disasm_line *dl = browser->offsets[offset], *dlt;
690691
struct browser_disasm_line *bdlt;
691692

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))
693695
continue;
694696

695697
if (dl->ops.target.offset >= size) {

0 commit comments

Comments
 (0)