Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jin, Yao
On 4/19/2017 8:53 AM, Jin, Yao wrote: On 4/19/2017 2:53 AM, Jiri Olsa wrote: On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP +const char *branch_type_name(int type) +{ +const char *branch_names[PERF_BR_MAX] = { +"N/A", +"JCC", +"JMP", +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jin, Yao
On 4/19/2017 8:53 AM, Jin, Yao wrote: On 4/19/2017 2:53 AM, Jiri Olsa wrote: On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP +const char *branch_type_name(int type) +{ +const char *branch_names[PERF_BR_MAX] = { +"N/A", +"JCC", +"JMP", +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jin, Yao
On 4/19/2017 2:53 AM, Jiri Olsa wrote: On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP +const char *branch_type_name(int type) +{ + const char *branch_names[PERF_BR_MAX] = { + "N/A", + "JCC", + "JMP", + "IND_JMP", +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jin, Yao
On 4/19/2017 2:53 AM, Jiri Olsa wrote: On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP +const char *branch_type_name(int type) +{ + const char *branch_names[PERF_BR_MAX] = { + "N/A", + "JCC", + "JMP", + "IND_JMP", +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jin, Yao
On 4/19/2017 2:53 AM, Jiri Olsa wrote: On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP +static int hist_iter__branch_callback(struct hist_entry_iter *iter, + struct addr_location *al __maybe_unused, + bool

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jin, Yao
On 4/19/2017 2:53 AM, Jiri Olsa wrote: On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP +static int hist_iter__branch_callback(struct hist_entry_iter *iter, + struct addr_location *al __maybe_unused, + bool

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP > +const char *branch_type_name(int type) > +{ > + const char *branch_names[PERF_BR_MAX] = { > + "N/A", > + "JCC", > + "JMP", > + "IND_JMP", > + "CALL", > +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP > +static int hist_iter__branch_callback(struct hist_entry_iter *iter, > + struct addr_location *al __maybe_unused, > + bool single __maybe_unused, > +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP > +const char *branch_type_name(int type) > +{ > + const char *branch_names[PERF_BR_MAX] = { > + "N/A", > + "JCC", > + "JMP", > + "IND_JMP", > + "CALL", > +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP > +static int hist_iter__branch_callback(struct hist_entry_iter *iter, > + struct addr_location *al __maybe_unused, > + bool single __maybe_unused, > +

[PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-11 Thread Jin Yao
Show the branch type statistics at the end of perf report --stdio. For example: perf report --stdio JCC forward: 27.8% JCC backward: 9.7% CROSS_4K: 0.0% CROSS_2M: 14.3% JCC: 37.6% JMP: 0.0% IND_JMP: 6.5% CALL: 26.6% RET: 29.3%

[PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-11 Thread Jin Yao
Show the branch type statistics at the end of perf report --stdio. For example: perf report --stdio JCC forward: 27.8% JCC backward: 9.7% CROSS_4K: 0.0% CROSS_2M: 14.3% JCC: 37.6% JMP: 0.0% IND_JMP: 6.5% CALL: 26.6% RET: 29.3%