Messages in this thread | | | Date | Wed, 26 Jun 2013 13:47:04 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 4/7] perf, x86: Save/resotre LBR stack during context switch |
| |
On Tue, Jun 25, 2013 at 04:47:16PM +0800, Yan, Zheng wrote: > From: "Yan, Zheng" <zheng.z.yan@intel.com> > > When the LBR call stack is enabled, it is necessary to save/restore > the stack on context switch. The solution is saving/restoring the > stack to/from task's perf event context. If task has no perf event > context, just flush the stack on context switch.
So I have some problems with this; suppose the LBR is shared between a cpu and a task event, when the task switches back in, it will over-write the LBR content with old stuff.
In that case the CPU event's LBR stack can be actively wrong, as opposed to being empty.
| |