Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles

Frank Ch. Eigler
2008-01-19T03:38:24Z

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