Skip to content

Commit 578bea4

Browse files
ahunter6acmel
authored andcommitted
perf script: Do not print dangling '=>' for BTS
When using: perf record -e branches:u -c1 usleep 1 perf script -f ip lines are displayed like: ffffffff813b23d5 => Change so that the dangling '=>' does not appear. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> 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/r/1406035081-14301-8-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 8066be5 commit 578bea4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tools/perf/builtin-script.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,13 @@ static void print_sample_bts(union perf_event *event,
446446
PERF_MAX_STACK_DEPTH);
447447
}
448448

449-
printf(" => ");
450-
451449
/* print branch_to information */
452450
if (PRINT_FIELD(ADDR) ||
453451
((evsel->attr.sample_type & PERF_SAMPLE_ADDR) &&
454-
!output[attr->type].user_set))
452+
!output[attr->type].user_set)) {
453+
printf(" => ");
455454
print_sample_addr(event, sample, al->machine, thread, attr);
455+
}
456456

457457
if (print_srcline_last)
458458
map__fprintf_srcline(al->map, al->addr, "\n ", stdout);

0 commit comments

Comments
 (0)