Re: [PATCH v9 2/7] perf/x86/intel: Record branch type

2017-07-18 Thread Peter Zijlstra
On Mon, Jul 17, 2017 at 04:28:38PM +0800, Jin, Yao wrote: > I'm also waiting for Peter's review comments for this patch update. Aside from Jiri's comment (which I agree with) Acked-by: Peter Zijlstra (Intel) for the first two patches.

Re: [PATCH v9 2/7] perf/x86/intel: Record branch type

2017-07-17 Thread Jin, Yao
On 7/17/2017 4:11 PM, Jiri Olsa wrote: On Mon, Jul 17, 2017 at 07:06:38PM +0800, Jin Yao wrote: SNIP +#define X86_BR_TYPE_MAP_MAX16 + +static int +common_branch_type(int type) +{ + int i; + const int branch_map[X86_BR_TYPE_MAP_MAX] = { + PERF_BR_CALL,

Re: [PATCH v9 2/7] perf/x86/intel: Record branch type

2017-07-17 Thread Jiri Olsa
On Mon, Jul 17, 2017 at 07:06:38PM +0800, Jin Yao wrote: SNIP > +#define X86_BR_TYPE_MAP_MAX 16 > + > +static int > +common_branch_type(int type) > +{ > + int i; > + const int branch_map[X86_BR_TYPE_MAP_MAX] = { > + PERF_BR_CALL, /* X86_BR_CALL */ > + PE

[PATCH v9 2/7] perf/x86/intel: Record branch type

2017-07-16 Thread Jin Yao
Perf already has support for disassembling the branch instruction and using the branch type for filtering. The patch just records the branch type in perf_branch_entry. Before recording, the patch converts the x86 branch type to common branch type. Change log -- v9: Use __ffs() to find fir