diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-01-26 16:56:06 -0500 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-01-26 17:44:46 -0500 |
| commit | 97cb4dc4e806cd52ea1c415bcd081f08c49b776d (patch) | |
| tree | 1b29f0aa22a0cf7b55c4a0176e4b73720625955c | |
| parent | f0b123c9458d6046c635a60bc41ad56135c09011 (diff) | |
Allow tracing of 'pull timer' events
How long does it take to program a remote timer on a remote CPU?
[semi-part backport]
| -rw-r--r-- | include/litmus/trace.h | 2 | ||||
| -rw-r--r-- | kernel/hrtimer.c | 3 |
2 files changed, 5 insertions, 0 deletions
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) | |||
| 78 | #define TS_TICK_START(t) TTIMESTAMP(110, t) | 78 | #define TS_TICK_START(t) TTIMESTAMP(110, t) |
| 79 | #define TS_TICK_END(t) TTIMESTAMP(111, t) | 79 | #define TS_TICK_END(t) TTIMESTAMP(111, t) |
| 80 | 80 | ||
| 81 | #define TS_PULL_TIMER_START TIMESTAMP(112) | ||
| 82 | #define TS_PULL_TIMER_END TIMESTAMP(113) | ||
| 81 | 83 | ||
| 82 | #define TS_PLUGIN_SCHED_START /* TIMESTAMP(120) */ /* currently unused */ | 84 | #define TS_PLUGIN_SCHED_START /* TIMESTAMP(120) */ /* currently unused */ |
| 83 | #define TS_PLUGIN_SCHED_END /* TIMESTAMP(121) */ | 85 | #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 @@ | |||
| 47 | #include <linux/timer.h> | 47 | #include <linux/timer.h> |
| 48 | 48 | ||
| 49 | #include <litmus/litmus.h> | 49 | #include <litmus/litmus.h> |
| 50 | #include <litmus/trace.h> | ||
| 50 | 51 | ||
| 51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
| 52 | 53 | ||
| @@ -1063,6 +1064,7 @@ void hrtimer_pull(void) | |||
| 1063 | struct hrtimer_start_on_info *info; | 1064 | struct hrtimer_start_on_info *info; |
| 1064 | struct list_head *pos, *safe, list; | 1065 | struct list_head *pos, *safe, list; |
| 1065 | 1066 | ||
| 1067 | TS_PULL_TIMER_START; | ||
| 1066 | raw_spin_lock(&base->lock); | 1068 | raw_spin_lock(&base->lock); |
| 1067 | list_replace_init(&base->to_pull, &list); | 1069 | list_replace_init(&base->to_pull, &list); |
| 1068 | raw_spin_unlock(&base->lock); | 1070 | raw_spin_unlock(&base->lock); |
| @@ -1073,6 +1075,7 @@ void hrtimer_pull(void) | |||
| 1073 | list_del(pos); | 1075 | list_del(pos); |
| 1074 | hrtimer_start(info->timer, info->time, info->mode); | 1076 | hrtimer_start(info->timer, info->time, info->mode); |
| 1075 | } | 1077 | } |
| 1078 | TS_PULL_TIMER_END; | ||
| 1076 | } | 1079 | } |
| 1077 | 1080 | ||
| 1078 | /** | 1081 | /** |
