|
@@ -55,9 +55,9 @@ TRACE_EVENT(sched_kthread_stop_ret,
|
|
|
*/
|
|
|
DECLARE_EVENT_CLASS(sched_wakeup_template,
|
|
|
|
|
|
- TP_PROTO(struct task_struct *p, int success),
|
|
|
+ TP_PROTO(struct task_struct *p),
|
|
|
|
|
|
- TP_ARGS(__perf_task(p), success),
|
|
|
+ TP_ARGS(__perf_task(p)),
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
__array( char, comm, TASK_COMM_LEN )
|
|
@@ -71,25 +71,37 @@ DECLARE_EVENT_CLASS(sched_wakeup_template,
|
|
|
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
|
|
|
__entry->pid = p->pid;
|
|
|
__entry->prio = p->prio;
|
|
|
- __entry->success = success;
|
|
|
+ __entry->success = 1; /* rudiment, kill when possible */
|
|
|
__entry->target_cpu = task_cpu(p);
|
|
|
),
|
|
|
|
|
|
- TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d",
|
|
|
+ TP_printk("comm=%s pid=%d prio=%d target_cpu=%03d",
|
|
|
__entry->comm, __entry->pid, __entry->prio,
|
|
|
- __entry->success, __entry->target_cpu)
|
|
|
+ __entry->target_cpu)
|
|
|
);
|
|
|
|
|
|
+/*
|
|
|
+ * Tracepoint called when waking a task; this tracepoint is guaranteed to be
|
|
|
+ * called from the waking context.
|
|
|
+ */
|
|
|
+DEFINE_EVENT(sched_wakeup_template, sched_waking,
|
|
|
+ TP_PROTO(struct task_struct *p),
|
|
|
+ TP_ARGS(p));
|
|
|
+
|
|
|
+/*
|
|
|
+ * Tracepoint called when the task is actually woken; p->state == TASK_RUNNNG.
|
|
|
+ * It it not always called from the waking context.
|
|
|
+ */
|
|
|
DEFINE_EVENT(sched_wakeup_template, sched_wakeup,
|
|
|
- TP_PROTO(struct task_struct *p, int success),
|
|
|
- TP_ARGS(p, success));
|
|
|
+ TP_PROTO(struct task_struct *p),
|
|
|
+ TP_ARGS(p));
|
|
|
|
|
|
/*
|
|
|
* Tracepoint for waking up a new task:
|
|
|
*/
|
|
|
DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new,
|
|
|
- TP_PROTO(struct task_struct *p, int success),
|
|
|
- TP_ARGS(p, success));
|
|
|
+ TP_PROTO(struct task_struct *p),
|
|
|
+ TP_ARGS(p));
|
|
|
|
|
|
#ifdef CREATE_TRACE_POINTS
|
|
|
static inline long __trace_sched_switch_state(struct task_struct *p)
|