diff options
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 60 |
1 files changed, 10 insertions, 50 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index ff037f0b1b4e..5d86fb2309d2 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -162,18 +162,23 @@ struct hrtimer_clock_base { | |||
162 | * @expires_next: absolute time of the next event which was scheduled | 162 | * @expires_next: absolute time of the next event which was scheduled |
163 | * via clock_set_next_event() | 163 | * via clock_set_next_event() |
164 | * @hres_active: State of high resolution mode | 164 | * @hres_active: State of high resolution mode |
165 | * @check_clocks: Indictator, when set evaluate time source and clock | 165 | * @hang_detected: The last hrtimer interrupt detected a hang |
166 | * event devices whether high resolution mode can be | 166 | * @nr_events: Total number of hrtimer interrupt events |
167 | * activated. | 167 | * @nr_retries: Total number of hrtimer interrupt retries |
168 | * @nr_events: Total number of timer interrupt events | 168 | * @nr_hangs: Total number of hrtimer interrupt hangs |
169 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | ||
169 | */ | 170 | */ |
170 | struct hrtimer_cpu_base { | 171 | struct hrtimer_cpu_base { |
171 | spinlock_t lock; | 172 | raw_spinlock_t lock; |
172 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | 173 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; |
173 | #ifdef CONFIG_HIGH_RES_TIMERS | 174 | #ifdef CONFIG_HIGH_RES_TIMERS |
174 | ktime_t expires_next; | 175 | ktime_t expires_next; |
175 | int hres_active; | 176 | int hres_active; |
177 | int hang_detected; | ||
176 | unsigned long nr_events; | 178 | unsigned long nr_events; |
179 | unsigned long nr_retries; | ||
180 | unsigned long nr_hangs; | ||
181 | ktime_t max_hang_time; | ||
177 | #endif | 182 | #endif |
178 | }; | 183 | }; |
179 | 184 | ||
@@ -435,49 +440,4 @@ extern u64 ktime_divns(const ktime_t kt, s64 div); | |||
435 | /* Show pending timers: */ | 440 | /* Show pending timers: */ |
436 | extern void sysrq_timer_list_show(void); | 441 | extern void sysrq_timer_list_show(void); |
437 | 442 | ||
438 | /* | ||
439 | * Timer-statistics info: | ||
440 | */ | ||
441 | #ifdef CONFIG_TIMER_STATS | ||
442 | |||
443 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | ||
444 | void *timerf, char *comm, | ||
445 | unsigned int timer_flag); | ||
446 | |||
447 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
448 | { | ||
449 | if (likely(!timer->start_site)) | ||
450 | return; | ||
451 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
452 | timer->function, timer->start_comm, 0); | ||
453 | } | ||
454 | |||
455 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | ||
456 | void *addr); | ||
457 | |||
458 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
459 | { | ||
460 | if (likely(!timer_stats_active)) | ||
461 | return; | ||
462 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | ||
463 | } | ||
464 | |||
465 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
466 | { | ||
467 | timer->start_site = NULL; | ||
468 | } | ||
469 | #else | ||
470 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
471 | { | ||
472 | } | ||
473 | |||
474 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
475 | { | ||
476 | } | ||
477 | |||
478 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
479 | { | ||
480 | } | ||
481 | #endif | ||
482 | |||
483 | #endif | 443 | #endif |