DEBUG: sched/tune: add tracepoint for task boost signal
authorPatrick Bellasi <patrick.bellasi@arm.com>
Thu, 14 Jan 2016 18:43:37 +0000 (18:43 +0000)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 14 Sep 2016 09:29:32 +0000 (14:59 +0530)
Change-Id: I545d3bf5569fc41c0fa70f51dff9a19c11d532ee
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
include/trace/events/sched.h
kernel/sched/fair.c

index 9bb0a264ad7d26667e1982d691a157ac1f923eaf..564e090fc00571a7c3b43719a1b2a595d238c54f 100644 (file)
@@ -813,6 +813,36 @@ TRACE_EVENT(sched_tune_boostgroup_update,
                __entry->cpu, __entry->variation, __entry->max_boost)
 );
 
+/*
+ * Tracepoint for accounting task boosted utilization
+ */
+TRACE_EVENT(sched_boost_task,
+
+       TP_PROTO(struct task_struct *tsk, unsigned long util, unsigned long margin),
+
+       TP_ARGS(tsk, util, margin),
+
+       TP_STRUCT__entry(
+               __array( char,  comm,   TASK_COMM_LEN           )
+               __field( pid_t,         pid                     )
+               __field( unsigned long, util                    )
+               __field( unsigned long, margin                  )
+
+       ),
+
+       TP_fast_assign(
+               memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
+               __entry->pid    = tsk->pid;
+               __entry->util   = util;
+               __entry->margin = margin;
+       ),
+
+       TP_printk("comm=%s pid=%d util=%lu margin=%lu",
+                 __entry->comm, __entry->pid,
+                 __entry->util,
+                 __entry->margin)
+);
+
 #endif /* _TRACE_SCHED_H */
 
 /* This part must be outside protection */
index 4fd9ddad3f691e49b20337ac5b9007a409733a51..1781c634e215f6c646fdc234f003ca1a0237fe9d 100644 (file)
@@ -5304,6 +5304,8 @@ boosted_task_util(struct task_struct *task)
        unsigned long util = task_util(task);
        unsigned long margin = schedtune_task_margin(task);
 
+       trace_sched_boost_task(task, util, margin);
+
        return util + margin;
 }