lkml.org 
[lkml]   [2014]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V5 02/16] perf, core: introduce pmu context switch callback
On Wed, Sep 10, 2014 at 10:08:59AM -0400, kan.liang@intel.com wrote:
> @@ -2446,6 +2499,9 @@ void __perf_event_task_sched_out(struct task_struct *task,
> {
> int ctxn;
>
> + if (__get_cpu_var(perf_sched_cb_usages))
> + perf_pmu_sched_task(task, next, false);
> +
> for_each_task_context_nr(ctxn)
> perf_event_context_sched_out(task, ctxn, next);
>
> @@ -2703,6 +2759,9 @@ void __perf_event_task_sched_in(struct task_struct *prev,
> /* check for system-wide branch_stack events */
> if (atomic_read(&__get_cpu_var(perf_branch_stack_events)))
> perf_branch_stack_sched_in(prev, task);
> +
> + if (__get_cpu_var(perf_sched_cb_usages))
> + perf_pmu_sched_task(prev, task, true);
> }
>

I think the general idea was to get rid of __get_cpu_var() and co,
please consider using __this_cpu_read().


\
 
 \ /
  Last update: 2014-09-24 15:41    [W:0.161 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site