summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantosh Shukla <santosh.shukla@linaro.org>2014-11-17 10:51:18 +0530
committerSantosh Shukla <sshukla@mvista.com>2014-11-17 10:53:03 +0530
commit0e00184e8e22e48446b738dce19bf2fc20e7d5c7 (patch)
tree4bb97a478bdd9a52b4f5b730cefbd649ef55e8c2
parent1ee5fe67718f3cf254850c899abad195dc19b94c (diff)
tracepoint: arch_arm_mode: set timer mode debug tracepoint
arch_arm_timer mode tracepoint to debug previous and current mode status. Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
-rw-r--r--drivers/clocksource/arm_arch_timer.c4
-rw-r--r--include/trace/events/timer.h19
2 files changed, 23 insertions, 0 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 7a888946fef4..ee2ef96d2956 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -178,10 +178,14 @@ static irqreturn_t arch_timer_handler_virt_mem(int irq, void *dev_id)
return timer_handler(ARCH_TIMER_MEM_VIRT_ACCESS, evt);
}
+#include <trace/events/timer.h>
static __always_inline int timer_set_mode(const int access, int mode,
struct clock_event_device *clk)
{
unsigned long ctrl;
+
+ trace_arch_set_mode(clk->mode, mode);
+
switch (mode) {
case CLOCK_EVT_MODE_UNUSED:
case CLOCK_EVT_MODE_SHUTDOWN:
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index 8a44722f911e..c022af2dc704 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -202,6 +202,25 @@ TRACE_EVENT(hrtimer_spurious,
TP_printk("count:%d", __entry->count)
);
+TRACE_EVENT(arch_set_mode,
+
+ TP_PROTO(int cur_mode, int new_mode),
+
+ TP_ARGS(cur_mode, new_mode),
+
+ TP_STRUCT__entry(
+ __field( int, cur_mode )
+ __field( int, new_mode )
+ ),
+
+ TP_fast_assign(
+ __entry->cur_mode = cur_mode;
+ __entry->new_mode = new_mode;
+ ),
+
+ TP_printk("cur_mode:%d new_mode:%d", __entry->cur_mode, __entry->new_mode)
+);
+
/**
* hrtimer_expire_entry - called immediately before the hrtimer callback
* @hrtimer: pointer to struct hrtimer