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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 7400900de94..54648e625ef 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
26struct hrtimer_clock_base; 27struct hrtimer_clock_base;
@@ -447,6 +448,8 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
447 448
448static inline void timer_stats_account_hrtimer(struct hrtimer *timer) 449static 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
457static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) 460static 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