Hi -

On Fri, Jan 18, 2008 at 06:19:29PM -0500, Mathieu Desnoyers wrote:
> [...]
> Almost.. I would add :
> 
> static int trace_switch_to_enabled;
> 
> > static inline trace_switch_to(struct task_struct *prev,
> >                     struct task_struct *next)
> > {
>     if (likely(!trace_switch_to_enabled))
>       return;
> >     trace_mark(kernel_schedudule,
> >             "prev_pid %d next_pid %d prev_state %ld",
> >             prev->pid, next->pid, prev->pid);
> > 
> >     trace_context_switch(prev, next);
> > }
> 
> And some code to activate the trace_switch_to_enabled variable (ideally
> keeping a refcount). [...]

All this complexity is to be justified by keeping the raw prev/next
pointers from being sent to a naive tracer?  It seems to me way out of
proportion.

- FChE
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to