aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hrtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r--include/linux/hrtimer.h56
1 files changed, 9 insertions, 47 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 9bace4b9f4fe..af634e95871d 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -162,10 +162,11 @@ 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 */
170struct hrtimer_cpu_base { 171struct hrtimer_cpu_base {
171 spinlock_t lock; 172 spinlock_t lock;
@@ -173,7 +174,11 @@ struct hrtimer_cpu_base {
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,47 +440,4 @@ extern u64 ktime_divns(const ktime_t kt, s64 div);
435/* Show pending timers: */ 440/* Show pending timers: */
436extern void sysrq_timer_list_show(void); 441extern void sysrq_timer_list_show(void);
437 442
438/*
439 * Timer-statistics info:
440 */
441#ifdef CONFIG_TIMER_STATS
442
443extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
444 void *timerf, char *comm,
445 unsigned int timer_flag);
446
447static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
448{
449 if (likely(!timer_stats_active))
450 return;
451 timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
452 timer->function, timer->start_comm, 0);
453}
454
455extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,
456 void *addr);
457
458static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
459{
460 __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0));
461}
462
463static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer)
464{
465 timer->start_site = NULL;
466}
467#else
468static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
469{
470}
471
472static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
473{
474}
475
476static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer)
477{
478}
479#endif
480
481#endif 443#endif