aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorSahara <keun-o.park@windriver.com>2013-06-20 22:12:28 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-24 07:09:03 -0400
commit247e9ee034b0448a585afa16e292cbb9dc0aef68 (patch)
treea6feaff9bd5bf5116e79432b96ae3cb6f0345381 /include/trace
parentd30b82a46942cda5c0af3744142a650db0732a7c (diff)
PM / QoS: Add pm_qos_update_target/flags tracepoints
This patch adds tracepoints to pm_qos_update_target and pm_qos_update_flags. It's useful for checking pm qos action, previous value and current value. Signed-off-by: Sahara <keun-o.park@windriver.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/power.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 427acab5d69a..f1e73bd04beb 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -5,6 +5,7 @@
5#define _TRACE_POWER_H 5#define _TRACE_POWER_H
6 6
7#include <linux/ktime.h> 7#include <linux/ktime.h>
8#include <linux/pm_qos.h>
8#include <linux/tracepoint.h> 9#include <linux/tracepoint.h>
9 10
10DECLARE_EVENT_CLASS(cpu, 11DECLARE_EVENT_CLASS(cpu,
@@ -177,6 +178,56 @@ DEFINE_EVENT(power_domain, power_domain_target,
177 178
178 TP_ARGS(name, state, cpu_id) 179 TP_ARGS(name, state, cpu_id)
179); 180);
181
182/*
183 * The pm qos events are used for pm qos update
184 */
185DECLARE_EVENT_CLASS(pm_qos_update,
186
187 TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
188
189 TP_ARGS(action, prev_value, curr_value),
190
191 TP_STRUCT__entry(
192 __field( enum pm_qos_req_action, action )
193 __field( int, prev_value )
194 __field( int, curr_value )
195 ),
196
197 TP_fast_assign(
198 __entry->action = action;
199 __entry->prev_value = prev_value;
200 __entry->curr_value = curr_value;
201 ),
202
203 TP_printk("action=%s prev_value=%d curr_value=%d",
204 __print_symbolic(__entry->action,
205 { PM_QOS_ADD_REQ, "ADD_REQ" },
206 { PM_QOS_UPDATE_REQ, "UPDATE_REQ" },
207 { PM_QOS_REMOVE_REQ, "REMOVE_REQ" }),
208 __entry->prev_value, __entry->curr_value)
209);
210
211DEFINE_EVENT(pm_qos_update, pm_qos_update_target,
212
213 TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
214
215 TP_ARGS(action, prev_value, curr_value)
216);
217
218DEFINE_EVENT_PRINT(pm_qos_update, pm_qos_update_flags,
219
220 TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
221
222 TP_ARGS(action, prev_value, curr_value),
223
224 TP_printk("action=%s prev_value=0x%x curr_value=0x%x",
225 __print_symbolic(__entry->action,
226 { PM_QOS_ADD_REQ, "ADD_REQ" },
227 { PM_QOS_UPDATE_REQ, "UPDATE_REQ" },
228 { PM_QOS_REMOVE_REQ, "REMOVE_REQ" }),
229 __entry->prev_value, __entry->curr_value)
230);
180#endif /* _TRACE_POWER_H */ 231#endif /* _TRACE_POWER_H */
181 232
182/* This part must be outside protection */ 233/* This part must be outside protection */