PM / devfreq: add tracing for scheduling work
authorLukasz Luba <l.luba@partner.samsung.com>
Mon, 18 Feb 2019 18:21:09 +0000 (19:21 +0100)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 16 Apr 2019 00:29:18 +0000 (09:29 +0900)
This patch add basic tracing of the devfreq workqueue and delayed work.
It aims to capture changes of the polling intervals and device state.

Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/devfreq.c

index 8928383a1fa1f7bdce4816c52788acc24f95a70c..6b6991f0e873f093c4cdac2fccfdd0534771043b 100644 (file)
@@ -29,6 +29,9 @@
 #include <linux/of.h>
 #include "governor.h"
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/devfreq.h>
+
 static struct class *devfreq_class;
 
 /*
@@ -394,6 +397,8 @@ static void devfreq_monitor(struct work_struct *work)
        queue_delayed_work(devfreq_wq, &devfreq->work,
                                msecs_to_jiffies(devfreq->profile->polling_ms));
        mutex_unlock(&devfreq->lock);
+
+       trace_devfreq_monitor(devfreq);
 }
 
 /**