Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-08 Thread Jin, Yao
Without this patch, we don't know if it's conditional or something else. And the kernel already knows this for its filtering, so it can as well report it. Right the CROSS_* and forward backward information could be computed later. -Andi OK, I will move CROSS_* and JCC forward/backward

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-08 Thread Jin, Yao
Without this patch, we don't know if it's conditional or something else. And the kernel already knows this for its filtering, so it can as well report it. Right the CROSS_* and forward backward information could be computed later. -Andi OK, I will move CROSS_* and JCC forward/backward

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Andi Kleen
> > It's a somewhat common situation with partially JITed code, if you > > don't have an agent. You can still do a lot of useful things. > > Like what? How can you say anything about code you don't have? For example if you combine the PMU topdown measurement, and see if it's frontend bound, and

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Andi Kleen
> > It's a somewhat common situation with partially JITed code, if you > > don't have an agent. You can still do a lot of useful things. > > Like what? How can you say anything about code you don't have? For example if you combine the PMU topdown measurement, and see if it's frontend bound, and

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Peter Zijlstra
On Fri, Apr 07, 2017 at 09:48:34AM -0700, Andi Kleen wrote: > On Fri, Apr 07, 2017 at 05:20:31PM +0200, Peter Zijlstra wrote: > > On Fri, Apr 07, 2017 at 06:47:43PM +0800, Jin Yao wrote: > > > Perf already has support for disassembling the branch instruction > > > and using the branch type for

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Peter Zijlstra
On Fri, Apr 07, 2017 at 09:48:34AM -0700, Andi Kleen wrote: > On Fri, Apr 07, 2017 at 05:20:31PM +0200, Peter Zijlstra wrote: > > On Fri, Apr 07, 2017 at 06:47:43PM +0800, Jin Yao wrote: > > > Perf already has support for disassembling the branch instruction > > > and using the branch type for

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Andi Kleen
On Fri, Apr 07, 2017 at 05:20:31PM +0200, Peter Zijlstra wrote: > On Fri, Apr 07, 2017 at 06:47:43PM +0800, Jin Yao wrote: > > Perf already has support for disassembling the branch instruction > > and using the branch type for filtering. The patch just records > > the branch type in

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Andi Kleen
On Fri, Apr 07, 2017 at 05:20:31PM +0200, Peter Zijlstra wrote: > On Fri, Apr 07, 2017 at 06:47:43PM +0800, Jin Yao wrote: > > Perf already has support for disassembling the branch instruction > > and using the branch type for filtering. The patch just records > > the branch type in

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Peter Zijlstra
On Fri, Apr 07, 2017 at 06:47:43PM +0800, Jin Yao wrote: > 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

Re: [PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-07 Thread Peter Zijlstra
On Fri, Apr 07, 2017 at 06:47:43PM +0800, Jin Yao wrote: > 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

[PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-06 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 classification to common branch classification and compute for checking if

[PATCH v2 2/5] perf/x86/intel: Record branch type

2017-04-06 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 classification to common branch classification and compute for checking if