Re: [PATCH] sched: split sched_switch trace event into two

From: Cong Wang
Date: Thu Jun 25 2015 - 13:04:46 EST


On Wed, Jun 24, 2015 at 6:05 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>> index c86935a..681fc50 100644
>> --- a/kernel/sched/core.c
>> +++ b/kernel/sched/core.c
>> @@ -2219,6 +2219,7 @@ prepare_task_switch(struct rq *rq, struct task_struct *prev,
>> struct task_struct *next)
>> {
>> trace_sched_switch(prev, next);
>> + trace_sched_out(prev);
>
> Tracepoints are low overhead, but they do take up space. This is a
> useless tracepoint. If anything, I'll work on adding an alias or
> something. But please don't add a tracepoint next to a tracepoint that
> encompasses the data.


Good point, agreed.

The reason why I picked sched_in and sched_out is that their names are
much better than sched_switch and sched_switch_post as you proposed.

Before you add tracepoint alias, adding sched_switch_post is better,
we probably can just add sched_in and sched_out as aliases to them after
your work is done. ;)

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