Re: [PATCH V4 09/16] perf, x86: Save/resotre LBR stack during context switch

2014-07-02 Thread Peter Zijlstra
On Mon, Jun 30, 2014 at 04:50:46PM +0800, Yan, Zheng wrote: > void intel_pmu_lbr_sched_task(struct perf_event_context *ctx, bool sched_in) > { > struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); > + struct x86_perf_task_context *task_ctx; > > if (!x86_pmu.lbr_nr) >

[PATCH V4 09/16] perf, x86: Save/resotre LBR stack during context switch

2014-06-30 Thread Yan, Zheng
When the LBR call stack is enabled, it is necessary to save/restore the LBR stack on context switch. The solution is saving/restoring the LBR stack to/from task's perf event context. The LBR stack is saved/restored only when there are events that use the LBR call stack. If no event uses LBR call s

[PATCH v4 09/16] perf, x86: Save/resotre LBR stack during context switch

2014-03-16 Thread Yan, Zheng
When the LBR call stack is enabled, it is necessary to save/restore the LBR stack on context switch. The solution is saving/restoring the LBR stack to/from task's perf event context. The LBR stack is saved/restored only when there are events that use the LBR call stack. If no event uses LBR call s