This source file includes following definitions.
- sched_clock_tick
- clear_sched_clock_stable
- sched_clock_idle_sleep_event
- sched_clock_idle_wakeup_event
- cpu_clock
- local_clock
- cpu_clock
- local_clock
- enable_sched_clock_irqtime
- disable_sched_clock_irqtime
1
2 #ifndef _LINUX_SCHED_CLOCK_H
3 #define _LINUX_SCHED_CLOCK_H
4
5 #include <linux/smp.h>
6
7
8
9
10
11
12
13
14
15 extern unsigned long long notrace sched_clock(void);
16
17
18
19
20 extern u64 running_clock(void);
21 extern u64 sched_clock_cpu(int cpu);
22
23
24 extern void sched_clock_init(void);
25
26 #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
27 static inline void sched_clock_tick(void)
28 {
29 }
30
31 static inline void clear_sched_clock_stable(void)
32 {
33 }
34
35 static inline void sched_clock_idle_sleep_event(void)
36 {
37 }
38
39 static inline void sched_clock_idle_wakeup_event(void)
40 {
41 }
42
43 static inline u64 cpu_clock(int cpu)
44 {
45 return sched_clock();
46 }
47
48 static inline u64 local_clock(void)
49 {
50 return sched_clock();
51 }
52 #else
53 extern int sched_clock_stable(void);
54 extern void clear_sched_clock_stable(void);
55
56
57
58
59
60 extern u64 __sched_clock_offset;
61
62 extern void sched_clock_tick(void);
63 extern void sched_clock_tick_stable(void);
64 extern void sched_clock_idle_sleep_event(void);
65 extern void sched_clock_idle_wakeup_event(void);
66
67
68
69
70
71
72
73
74
75
76
77 static inline u64 cpu_clock(int cpu)
78 {
79 return sched_clock_cpu(cpu);
80 }
81
82 static inline u64 local_clock(void)
83 {
84 return sched_clock_cpu(raw_smp_processor_id());
85 }
86 #endif
87
88 #ifdef CONFIG_IRQ_TIME_ACCOUNTING
89
90
91
92
93
94 extern void enable_sched_clock_irqtime(void);
95 extern void disable_sched_clock_irqtime(void);
96 #else
97 static inline void enable_sched_clock_irqtime(void) {}
98 static inline void disable_sched_clock_irqtime(void) {}
99 #endif
100
101 #endif