DEBUG: schedtune: add tracepoint for schedtune_tasks_update() values
[firefly-linux-kernel-4.4.55.git] / kernel / sched / tune.c
index 3920baad104ff8da4fd68e40b211229013bee2bd..9d8eeb4381409fd1f16572fdc61172214efc3234 100644 (file)
@@ -264,12 +264,18 @@ schedtune_boostgroup_update(int idx, int boost)
                /* Check if this update increase current max */
                if (boost > cur_boost_max && bg->group[idx].tasks) {
                        bg->boost_max = boost;
+                       trace_sched_tune_boostgroup_update(cpu, 1, bg->boost_max);
                        continue;
                }
 
                /* Check if this update has decreased current max */
-               if (cur_boost_max == old_boost && old_boost > boost)
+               if (cur_boost_max == old_boost && old_boost > boost) {
                        schedtune_cpu_update(cpu);
+                       trace_sched_tune_boostgroup_update(cpu, -1, bg->boost_max);
+                       continue;
+               }
+
+               trace_sched_tune_boostgroup_update(cpu, 0, bg->boost_max);
        }
 
        return 0;
@@ -293,6 +299,10 @@ schedtune_tasks_update(struct task_struct *p, int cpu, int idx, int task_count)
        tasks = bg->group[idx].tasks;
        if (tasks == 1 || tasks == 0)
                schedtune_cpu_update(cpu);
+
+       trace_sched_tune_tasks_update(p, cpu, tasks, idx,
+                       bg->group[idx].boost, bg->boost_max);
+
 }
 
 /*