lkml.org 
[lkml]   [2014]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 03/16] perf, x86: use context switch callback to flush LBR stack
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 happens
>> + * when the branch stack does not tag its entries with the pid of the
>> + * current task.
>
> Did you mean to say: "This happens _because_ the branch stack does not
> tag its entries with the pid of the current task." ?

yes. The comment is copied from comments of perf_branch_stack_sched_in()

Regards
Yan, Zheng

>
>> + */
>> + if (sched_in) {
>> + intel_pmu_lbr_reset();
>> + cpuc->lbr_context = ctx;
>> + }
>> +}



\
 
 \ /
  Last update: 2014-07-03 08:21    [W:0.093 / U:2.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site