diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-12-10 04:56:29 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-10 07:08:11 -0500 |
commit | 5f201907dfe4ad42c44006ddfcec00ed12e59497 (patch) | |
tree | b796471d44eb588f8d95affaeb0aa6cf6478b460 /include/linux/hrtimer.h | |
parent | 41d2e494937715d3150e5c75d01f0e75ae899337 (diff) |
hrtimer: move timer stats helper functions to hrtimer.c
There is no reason to make timer_stats_hrtimer_set_start_info and
friends visible to the rest of the kernel. So move all of them to
hrtimer.c. Also make timer_stats_hrtimer_set_start_info a static
inline function so it gets inlined and we avoid another function call.
Based on a patch by Thomas Gleixner.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
LKML-Reference: <20091210095629.GC4144@osiris.boeblingen.de.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 040b6796ab4d..af634e95871d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -440,47 +440,4 @@ extern u64 ktime_divns(const ktime_t kt, s64 div); | |||
440 | /* Show pending timers: */ | 440 | /* Show pending timers: */ |
441 | extern void sysrq_timer_list_show(void); | 441 | extern void sysrq_timer_list_show(void); |
442 | 442 | ||
443 | /* | ||
444 | * Timer-statistics info: | ||
445 | */ | ||
446 | #ifdef CONFIG_TIMER_STATS | ||
447 | |||
448 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | ||
449 | void *timerf, char *comm, | ||
450 | unsigned int timer_flag); | ||
451 | |||
452 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
453 | { | ||
454 | if (likely(!timer_stats_active)) | ||
455 | return; | ||
456 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
457 | timer->function, timer->start_comm, 0); | ||
458 | } | ||
459 | |||
460 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | ||
461 | void *addr); | ||
462 | |||
463 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
464 | { | ||
465 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | ||
466 | } | ||
467 | |||
468 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
469 | { | ||
470 | timer->start_site = NULL; | ||
471 | } | ||
472 | #else | ||
473 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
474 | { | ||
475 | } | ||
476 | |||
477 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
478 | { | ||
479 | } | ||
480 | |||
481 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
482 | { | ||
483 | } | ||
484 | #endif | ||
485 | |||
486 | #endif | 443 | #endif |