Skip to content

Commit

Permalink
tracing: Convert more sched events to DEFINE_EVENT
Browse files Browse the repository at this point in the history
Convert sched_wait_task to DEFINE_EVENT, and save ~1K:

   text    data     bss     dec     hex filename
 104595    9424    4992  119011   1d0e3 kernel/sched.o.orig
 103619    9344    4992  117955   1ccc3 kernel/sched.o

No change in functionality.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4BFA3787.2040800@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Li Zefan authored and Steven Rostedt committed Jun 28, 2010
1 parent 363d0f6 commit 210f766
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions include/trace/events/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,6 @@ TRACE_EVENT(sched_kthread_stop_ret,
TP_printk("ret=%d", __entry->ret)
);

/*
* Tracepoint for waiting on task to unschedule:
*/
TRACE_EVENT(sched_wait_task,

TP_PROTO(struct task_struct *p),

TP_ARGS(p),

TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, prio )
),

TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->prio = p->prio;
),

TP_printk("comm=%s pid=%d prio=%d",
__entry->comm, __entry->pid, __entry->prio)
);

/*
* Tracepoint for waking up a task:
*/
Expand Down Expand Up @@ -239,6 +214,13 @@ DEFINE_EVENT(sched_process_template, sched_process_exit,
TP_PROTO(struct task_struct *p),
TP_ARGS(p));

/*
* Tracepoint for waiting on task to unschedule:
*/
DEFINE_EVENT(sched_process_template, sched_wait_task,
TP_PROTO(struct task_struct *p),
TP_ARGS(p));

/*
* Tracepoint for a waiting task:
*/
Expand Down

0 comments on commit 210f766

Please sign in to comment.