lkml.org 
[lkml]   [2011]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] perf_event: fix slow and broken cgroup context switch code
From
Date
On Thu, 2011-08-25 at 15:58 +0200, Stephane Eranian wrote:
> +static inline void perf_event_task_sched_in(struct task_struct *prev,
> + struct task_struct *task)
> {
> if (static_branch(&perf_sched_events))
> + __perf_event_task_sched_in(prev, task);
> }
>
> +static inline void perf_event_task_sched_out(struct task_struct *prev,
> + struct task_struct *next)
> {
> perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0);
>
> + if (static_branch(&perf_sched_events))
> + __perf_event_task_sched_out(prev, next);
> }

BTW, Ingo, is there any particular reason we have these two calls and
not a single perf_event_task_switch() call?


\
 
 \ /
  Last update: 2011-08-25 16:25    [W:0.048 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site