diff options
author | Chris Redpath <chris.redpath@arm.com> | 2013-10-11 11:44:59 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-10-11 15:07:17 +0100 |
commit | 7b8e0b3f2af55b1ffb5c10be1daa59d8dc21d140 (patch) | |
tree | ad4fa53146152fb3c9fc780033602d1803ad30ff /include | |
parent | d73babce9a77f8143136fe0d7b6c1ae44b5652dc (diff) |
sched: HMP: Additional trace points for debugging HMP behaviour
1. Replace magic numbers in code for migration trace.
Trace points still emit a number as force=<n> field:
force=0 : wakeup migration
force=1 : forced migration
force=2 : offload migration
force=3 : idle pull migration
2. Add trace to expose offload decision-making.
Also adds tracing rq->nr_running so that you can
look back to see what state the RQ was in at the time.
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/sched.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 203e8e9933b..66dc53bca19 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -530,6 +530,29 @@ TRACE_EVENT(sched_rq_runnable_load, __entry->load) ); +TRACE_EVENT(sched_rq_nr_running, + + TP_PROTO(int cpu, unsigned int nr_running, int nr_iowait), + + TP_ARGS(cpu, nr_running, nr_iowait), + + TP_STRUCT__entry( + __field(int, cpu) + __field(unsigned int, nr_running) + __field(int, nr_iowait) + ), + + TP_fast_assign( + __entry->cpu = cpu; + __entry->nr_running = nr_running; + __entry->nr_iowait = nr_iowait; + ), + + TP_printk("cpu=%d nr_running=%u nr_iowait=%d", + __entry->cpu, + __entry->nr_running, __entry->nr_iowait) +); + /* * Tracepoint for showing tracked task cpu usage ratio [0..1023]. */ @@ -559,6 +582,10 @@ TRACE_EVENT(sched_task_usage_ratio, /* * Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations. */ +#define HMP_MIGRATE_WAKEUP 0 +#define HMP_MIGRATE_FORCE 1 +#define HMP_MIGRATE_OFFLOAD 2 +#define HMP_MIGRATE_IDLE_PULL 3 TRACE_EVENT(sched_hmp_migrate, TP_PROTO(struct task_struct *tsk, int dest, int force), @@ -583,6 +610,51 @@ TRACE_EVENT(sched_hmp_migrate, __entry->comm, __entry->pid, __entry->dest, __entry->force) ); + +TRACE_EVENT(sched_hmp_offload_abort, + + TP_PROTO(int cpu, int data, char *label), + + TP_ARGS(cpu,data,label), + + TP_STRUCT__entry( + __array(char, label, 64) + __field(int, cpu) + __field(int, data) + ), + + TP_fast_assign( + strncpy(__entry->label, label, 64); + __entry->cpu = cpu; + __entry->data = data; + ), + + TP_printk("cpu=%d data=%d label=%63s", + __entry->cpu, __entry->data, + __entry->label) +); + +TRACE_EVENT(sched_hmp_offload_succeed, + + TP_PROTO(int cpu, int dest_cpu), + + TP_ARGS(cpu,dest_cpu), + + TP_STRUCT__entry( + __field(int, cpu) + __field(int, dest_cpu) + ), + + TP_fast_assign( + __entry->cpu = cpu; + __entry->dest_cpu = dest_cpu; + ), + + TP_printk("cpu=%d dest=%d", + __entry->cpu, + __entry->dest_cpu) +); + #endif /* _TRACE_SCHED_H */ /* This part must be outside protection */ |