Merge branch 'lsk-v4.4-eas-v5.2' of git://git.linaro.org/arm/eas/kernel.git
[firefly-linux-kernel-4.4.55.git] / include / trace / events / sched.h
index d34eba74af27d1cfa0ff8188172c5fa0b3073f4c..9bb0a264ad7d26667e1982d691a157ac1f923eaf 100644 (file)
@@ -611,6 +611,208 @@ TRACE_EVENT(sched_wake_idle_without_ipi,
 
        TP_printk("cpu=%d", __entry->cpu)
 );
+
+TRACE_EVENT(sched_contrib_scale_f,
+
+       TP_PROTO(int cpu, unsigned long freq_scale_factor,
+                unsigned long cpu_scale_factor),
+
+       TP_ARGS(cpu, freq_scale_factor, cpu_scale_factor),
+
+       TP_STRUCT__entry(
+               __field(int, cpu)
+               __field(unsigned long, freq_scale_factor)
+               __field(unsigned long, cpu_scale_factor)
+       ),
+
+       TP_fast_assign(
+               __entry->cpu = cpu;
+               __entry->freq_scale_factor = freq_scale_factor;
+               __entry->cpu_scale_factor = cpu_scale_factor;
+       ),
+
+       TP_printk("cpu=%d freq_scale_factor=%lu cpu_scale_factor=%lu",
+                 __entry->cpu, __entry->freq_scale_factor,
+                 __entry->cpu_scale_factor)
+);
+
+/*
+ * Tracepoint for accounting sched averages for tasks.
+ */
+TRACE_EVENT(sched_load_avg_task,
+
+       TP_PROTO(struct task_struct *tsk, struct sched_avg *avg),
+
+       TP_ARGS(tsk, avg),
+
+       TP_STRUCT__entry(
+               __array( char,  comm,   TASK_COMM_LEN           )
+               __field( pid_t, pid                             )
+               __field( int,   cpu                             )
+               __field( unsigned long, load_avg                )
+               __field( unsigned long, util_avg                )
+               __field( u64,           load_sum                )
+               __field( u32,           util_sum                )
+               __field( u32,           period_contrib          )
+       ),
+
+       TP_fast_assign(
+               memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
+               __entry->pid                    = tsk->pid;
+               __entry->cpu                    = task_cpu(tsk);
+               __entry->load_avg               = avg->load_avg;
+               __entry->util_avg               = avg->util_avg;
+               __entry->load_sum               = avg->load_sum;
+               __entry->util_sum               = avg->util_sum;
+               __entry->period_contrib         = avg->period_contrib;
+       ),
+
+       TP_printk("comm=%s pid=%d cpu=%d load_avg=%lu util_avg=%lu load_sum=%llu"
+                 " util_sum=%u period_contrib=%u",
+                 __entry->comm,
+                 __entry->pid,
+                 __entry->cpu,
+                 __entry->load_avg,
+                 __entry->util_avg,
+                 (u64)__entry->load_sum,
+                 (u32)__entry->util_sum,
+                 (u32)__entry->period_contrib)
+);
+
+/*
+ * Tracepoint for accounting sched averages for cpus.
+ */
+TRACE_EVENT(sched_load_avg_cpu,
+
+       TP_PROTO(int cpu, struct cfs_rq *cfs_rq),
+
+       TP_ARGS(cpu, cfs_rq),
+
+       TP_STRUCT__entry(
+               __field( int,   cpu                             )
+               __field( unsigned long, load_avg                )
+               __field( unsigned long, util_avg                )
+       ),
+
+       TP_fast_assign(
+               __entry->cpu                    = cpu;
+               __entry->load_avg               = cfs_rq->avg.load_avg;
+               __entry->util_avg               = cfs_rq->avg.util_avg;
+       ),
+
+       TP_printk("cpu=%d load_avg=%lu util_avg=%lu",
+                 __entry->cpu, __entry->load_avg, __entry->util_avg)
+);
+
+/*
+ * Tracepoint for sched_tune_config settings
+ */
+TRACE_EVENT(sched_tune_config,
+
+       TP_PROTO(int boost),
+
+       TP_ARGS(boost),
+
+       TP_STRUCT__entry(
+               __field( int,   boost           )
+       ),
+
+       TP_fast_assign(
+               __entry->boost  = boost;
+       ),
+
+       TP_printk("boost=%d ", __entry->boost)
+);
+
+/*
+ * Tracepoint for accounting CPU  boosted utilization
+ */
+TRACE_EVENT(sched_boost_cpu,
+
+       TP_PROTO(int cpu, unsigned long util, unsigned long margin),
+
+       TP_ARGS(cpu, util, margin),
+
+       TP_STRUCT__entry(
+               __field( int,           cpu                     )
+               __field( unsigned long, util                    )
+               __field( unsigned long, margin                  )
+       ),
+
+       TP_fast_assign(
+               __entry->cpu    = cpu;
+               __entry->util   = util;
+               __entry->margin = margin;
+       ),
+
+       TP_printk("cpu=%d util=%lu margin=%lu",
+                 __entry->cpu,
+                 __entry->util,
+                 __entry->margin)
+);
+
+/*
+ * Tracepoint for schedtune_tasks_update
+ */
+TRACE_EVENT(sched_tune_tasks_update,
+
+       TP_PROTO(struct task_struct *tsk, int cpu, int tasks, int idx,
+               unsigned int boost, unsigned int max_boost),
+
+       TP_ARGS(tsk, cpu, tasks, idx, boost, max_boost),
+
+       TP_STRUCT__entry(
+               __array( char,  comm,   TASK_COMM_LEN   )
+               __field( pid_t,         pid             )
+               __field( int,           cpu             )
+               __field( int,           tasks           )
+               __field( int,           idx             )
+               __field( unsigned int,  boost           )
+               __field( unsigned int,  max_boost       )
+       ),
+
+       TP_fast_assign(
+               memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
+               __entry->pid            = tsk->pid;
+               __entry->cpu            = cpu;
+               __entry->tasks          = tasks;
+               __entry->idx            = idx;
+               __entry->boost          = boost;
+               __entry->max_boost      = max_boost;
+       ),
+
+       TP_printk("pid=%d comm=%s "
+                       "cpu=%d tasks=%d idx=%d boost=%u max_boost=%u",
+               __entry->pid, __entry->comm,
+               __entry->cpu, __entry->tasks, __entry->idx,
+               __entry->boost, __entry->max_boost)
+);
+
+/*
+ * Tracepoint for schedtune_boostgroup_update
+ */
+TRACE_EVENT(sched_tune_boostgroup_update,
+
+       TP_PROTO(int cpu, int variation, int max_boost),
+
+       TP_ARGS(cpu, variation, max_boost),
+
+       TP_STRUCT__entry(
+               __field( int,   cpu             )
+               __field( int,   variation       )
+               __field( int,   max_boost       )
+       ),
+
+       TP_fast_assign(
+               __entry->cpu            = cpu;
+               __entry->variation      = variation;
+               __entry->max_boost      = max_boost;
+       ),
+
+       TP_printk("cpu=%d variation=%d max_boost=%d",
+               __entry->cpu, __entry->variation, __entry->max_boost)
+);
+
 #endif /* _TRACE_SCHED_H */
 
 /* This part must be outside protection */