Re: [PATCH V4 07/16] perf, x86: track number of events that use LBR callstack

2014-07-06 Thread Yan, Zheng
please ignore this patch On 07/07/2014 02:28 PM, Yan, Zheng wrote: > When enabling/disabling an event, check if the event uses the LBR > callstack feature, adjust the LBR callstack usage count accordingly. > Later patch will use the usage count to decide if LBR stack should > be saved/restored. >

[PATCH V4 07/16] perf, x86: track number of events that use LBR callstack

2014-07-06 Thread Yan, Zheng
When enabling/disabling an event, check if the event uses the LBR callstack feature, adjust the LBR callstack usage count accordingly. Later patch will use the usage count to decide if LBR stack should be saved/restored. Signed-off-by: Yan, Zheng --- arch/x86/kernel/cpu/perf_event_intel_lbr.c |

Re: [PATCH V4 07/16] perf, x86: track number of events that use LBR callstack

2014-07-02 Thread Yan, Zheng
On 07/02/2014 06:21 PM, Peter Zijlstra wrote: > On Mon, Jun 30, 2014 at 04:50:44PM +0800, Yan, Zheng wrote: >> +static inline bool branch_user_callstack(unsigned br_sel) >> +{ >> +return (br_sel & X86_BR_USER) && (br_sel & X86_BR_CALL_STACK); >> +} >> + >> void intel_pmu_lbr_enable(struct perf

Re: [PATCH V4 07/16] perf, x86: track number of events that use LBR callstack

2014-07-02 Thread Peter Zijlstra
On Mon, Jun 30, 2014 at 04:50:44PM +0800, Yan, Zheng wrote: > void intel_pmu_lbr_enable(struct perf_event *event) > { > struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); > + struct x86_perf_task_context *task_ctx; This won't compile; you've forgotten to declare that type. p

Re: [PATCH V4 07/16] perf, x86: track number of events that use LBR callstack

2014-07-02 Thread Peter Zijlstra
On Mon, Jun 30, 2014 at 04:50:44PM +0800, Yan, Zheng wrote: > +static inline bool branch_user_callstack(unsigned br_sel) > +{ > + return (br_sel & X86_BR_USER) && (br_sel & X86_BR_CALL_STACK); > +} > + > void intel_pmu_lbr_enable(struct perf_event *event) > { > struct cpu_hw_events *cpu

[PATCH V4 07/16] perf, x86: track number of events that use LBR callstack

2014-06-30 Thread Yan, Zheng
When enabling/disabling an event, check if the event uses the LBR callstack feature, adjust the LBR callstack usage count accordingly. Later patch will use the usage count to decide if LBR stack should be saved/restored. Signed-off-by: Yan, Zheng --- arch/x86/kernel/cpu/perf_event_intel_lbr.c |

[PATCH v4 07/16] perf, x86: track number of events that use LBR callstack

2014-03-16 Thread Yan, Zheng
When enabling/disabling an event, check if the event uses the LBR callstack feature, adjust the LBR callstack usage count accordingly. Later patch will use the usage count to decide if LBR stack should be saved/restored. Signed-off-by: Yan, Zheng --- arch/x86/kernel/cpu/perf_event_intel_lbr.c |