diff options
Diffstat (limited to 'include/linux/hrtimer.h')
| -rw-r--r-- | include/linux/hrtimer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 7400900de94a..54648e625efd 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
| 22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
| 23 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
| 24 | #include <linux/timer.h> | ||
| 24 | 25 | ||
| 25 | 26 | ||
| 26 | struct hrtimer_clock_base; | 27 | struct hrtimer_clock_base; |
| @@ -447,6 +448,8 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
| 447 | 448 | ||
| 448 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 449 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
| 449 | { | 450 | { |
| 451 | if (likely(!timer->start_pid)) | ||
| 452 | return; | ||
| 450 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 453 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
| 451 | timer->function, timer->start_comm, 0); | 454 | timer->function, timer->start_comm, 0); |
| 452 | } | 455 | } |
| @@ -456,6 +459,8 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | |||
| 456 | 459 | ||
| 457 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | 460 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) |
| 458 | { | 461 | { |
| 462 | if (likely(!timer_stats_active)) | ||
| 463 | return; | ||
| 459 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | 464 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); |
| 460 | } | 465 | } |
| 461 | 466 | ||
