Re: [PATCH v5 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jin, Yao
On 4/19/2017 10:15 PM, Jiri Olsa wrote: On Wed, Apr 19, 2017 at 11:48:14PM +0800, Jin Yao wrote: SNIP +static int branch_type_str(struct branch_type_stat *stat, + char *bf, int bfsize) +{ + int i, j = 0, printed = 0; + u64 total = 0; + + for (i = 0;

Re: [PATCH v5 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:14PM +0800, Jin Yao wrote: SNIP > +static int branch_type_str(struct branch_type_stat *stat, > +char *bf, int bfsize) > +{ > + int i, j = 0, printed = 0; > + u64 total = 0; > + > + for (i = 0; i < PERF_BR_MAX; i++) > +

Re: [PATCH v5 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:14PM +0800, Jin Yao wrote: SNIP > +static int count_str_printf(int index, const char *str, > + char *bf, int bfsize) > +{ > + int printed; > + > + printed = scnprintf(bf, bfsize, > + "%s%s", > + (index) ? " " : " (", str); > + > +

[PATCH v5 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jin Yao
Show branch type in callchain entry. The branch type is printed with other LBR information (such as cycles/abort/...). For example: perf report --branch-history --stdio --no-children --23.56%--main div.c:42 (RET CROSS_2M cycles:2) compute_flag div.c:28 (cycles:2) compute_flag