> On Wed, 2008-06-04 at 19:22 -0400, Mathieu Desnoyers wrote:
>> * Peter Zijlstra (
peterz@infradead.org) wrote:
>
>>> So are you proposing something like:
>>>
>>> static inline void
>>> trace_sched_switch(struct task_struct *prev, struct task_struct *next)
>>> {
>>> trace_mark(sched_switch, prev, next);
>>> }
>>>
>> Not exactly. Something more along the lines of
>>
>> static inline void
>> trace_sched_switch(struct task_struct *prev, struct task_struct *next)
>> {
>> /* Internal tracers. */
>> ftrace_sched_switch(prev, next);
>> othertracer_sched_switch(prev, next);
>> /*
>> * System-wide tracing. Useful information is exported here.
>> * Probes connecting to these markers are expected to only use the
>> * information provided to them for data collection purpose. Type
>> * casting pointers is discouraged.
>> */
>> trace_mark(kernel_sched_switch, "prev_pid %d next_pid %d prev_state %ld",
>> prev->pid, next->pid, prev->state);
>> }
>
> Advantage of my method would be that ftrace (and othertracer) can use
> the same marker and doesn't need yet another hoook.