aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Rasmussen <Morten.Rasmussen@arm.com>2012-06-25 16:11:44 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2012-07-25 10:03:59 +0100
commite97ad684522fa231bbb9da3d0f0c89bcda345e6e (patch)
tree10451d3c41c5b713500420511378f4deda9d4568
parentff8a9da13f02c8d3a39be61f1cf3542a864b878b (diff)
sched: Add HMP forced task migration ftrace event
Adds ftrace event for tracing forced task migrations using HMP optimized scheduling. Signed-off-by: Morten Rasmussen <Morten.Rasmussen@arm.com>
-rw-r--r--include/trace/events/sched.h26
-rw-r--r--kernel/sched/fair.c1
2 files changed, 27 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 002317926c2c..2c50a06fbedd 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -551,6 +551,32 @@ TRACE_EVENT(sched_task_usage_ratio,
__entry->comm, __entry->pid,
__entry->ratio)
);
+
+/*
+ * Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations.
+ */
+TRACE_EVENT(sched_hmp_migrate,
+
+ TP_PROTO(struct task_struct *tsk, int val),
+
+ TP_ARGS(tsk, val),
+
+ TP_STRUCT__entry(
+ __array(char, comm, TASK_COMM_LEN)
+ __field(pid_t, pid)
+ __field(int, val)
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
+ __entry->pid = tsk->pid;
+ __entry->val = val;
+ ),
+
+ TP_printk("comm=%s pid=%d val=%d",
+ __entry->comm, __entry->pid,
+ __entry->val)
+);
#endif /* _TRACE_SCHED_H */
/* This part must be outside protection */
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5033c208ab92..f705a87ac7b5 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5572,6 +5572,7 @@ static void hmp_force_up_migration(int this_cpu)
target->push_cpu = hmp_select_fast_cpu(p);
target->migrate_task = p;
force = 1;
+ trace_sched_hmp_migrate(p, 1);
}
}
raw_spin_unlock_irqrestore(&target->lock, flags);