From 46fe457792f9debcd3379abffe2b30933c085041 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Tue, 28 Sep 2010 19:00:47 -0400 Subject: Add tracing for timer-pulling overhead. --- include/litmus/trace.h | 2 ++ kernel/hrtimer.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/litmus/trace.h b/include/litmus/trace.h index b32c71180774..6afbf96ef9e4 100644 --- a/include/litmus/trace.h +++ b/include/litmus/trace.h @@ -78,6 +78,8 @@ feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu) #define TS_TICK_START(t) TTIMESTAMP(110, t) #define TS_TICK_END(t) TTIMESTAMP(111, t) +#define TS_PULL_TIMER_START TIMESTAMP(112) +#define TS_PULL_TIMER_END TIMESTAMP(113) #define TS_PLUGIN_SCHED_START /* TIMESTAMP(120) */ /* currently unused */ #define TS_PLUGIN_SCHED_END /* TIMESTAMP(121) */ diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index fdf95968e517..23d3712012f4 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -47,6 +47,7 @@ #include #include +#include #include @@ -1063,6 +1064,7 @@ void hrtimer_pull(void) struct hrtimer_start_on_info *info; struct list_head *pos, *safe, list; + TS_PULL_TIMER_START; raw_spin_lock(&base->lock); list_replace_init(&base->to_pull, &list); raw_spin_unlock(&base->lock); @@ -1073,6 +1075,7 @@ void hrtimer_pull(void) list_del(pos); hrtimer_start(info->timer, info->time, info->mode); } + TS_PULL_TIMER_END; } /** -- cgit v1.2.2