Re: [PATCH V4 03/16] perf, x86: use context switch callback to flush LBR stack

2014-07-02 Thread Yan, Zheng
On 07/02/2014 05:06 PM, Peter Zijlstra wrote: > On Mon, Jun 30, 2014 at 04:50:40PM +0800, Yan, Zheng wrote: >> @@ -185,6 +185,23 @@ void intel_pmu_lbr_enable(struct perf_event *event) >> return; >> >> /* >> + * It is necessary to flush the stack on context switch. This happe

Re: [PATCH V4 03/16] perf, x86: use context switch callback to flush LBR stack

2014-07-02 Thread Peter Zijlstra
On Mon, Jun 30, 2014 at 04:50:40PM +0800, Yan, Zheng wrote: > @@ -185,6 +185,23 @@ void intel_pmu_lbr_enable(struct perf_event *event) > return; > > /* > + * It is necessary to flush the stack on context switch. This happens > + * when the branch stack does not tag i

[PATCH V4 03/16] perf, x86: use context switch callback to flush LBR stack

2014-06-30 Thread Yan, Zheng
Previous commit introduces context switch callback, its function overlaps with the flush branch stack callback. So we can use the context switch callback to flush LBR stack. This patch adds code that uses the flush branch callback to flush the LBR stack when task is being scheduled in. The callbac

[PATCH v4 03/16] perf, x86: use context switch callback to flush LBR stack

2014-03-16 Thread Yan, Zheng
Previous commit introduces context switch callback, its function overlaps with the flush branch stack callback. So we can use the context switch callback to flush LBR stack. This patch adds code that uses the flush branch callback to flush the LBR stack when task is being scheduled in. The callbac