diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:20:41 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:30:55 -0400 |
commit | bd3bff9e20f454b242d979ec2f9a4dca0d5fa06f (patch) | |
tree | f9aa5959cb63a0c9d51185109264dd0b0f547765 /include/linux/sched.h | |
parent | 75d3bce2fc0a80f435fe12f2c9ed2632c8ac29e4 (diff) |
sched: add latency tracer callbacks to the scheduler
add 3 lightweight callbacks to the tracer backend.
zero impact if tracing is turned off.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5395a6176f4b..717cab8a0c83 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2117,6 +2117,32 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) | |||
2117 | } | 2117 | } |
2118 | #endif | 2118 | #endif |
2119 | 2119 | ||
2120 | #ifdef CONFIG_CONTEXT_SWITCH_TRACER | ||
2121 | extern void | ||
2122 | ftrace_ctx_switch(struct task_struct *prev, struct task_struct *next); | ||
2123 | #else | ||
2124 | static inline void | ||
2125 | ftrace_ctx_switch(struct task_struct *prev, struct task_struct *next) | ||
2126 | { | ||
2127 | } | ||
2128 | #endif | ||
2129 | |||
2130 | #ifdef CONFIG_SCHED_TRACER | ||
2131 | extern void | ||
2132 | ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr); | ||
2133 | extern void | ||
2134 | ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr); | ||
2135 | #else | ||
2136 | static inline void | ||
2137 | ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr) | ||
2138 | { | ||
2139 | } | ||
2140 | static inline void | ||
2141 | ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr) | ||
2142 | { | ||
2143 | } | ||
2144 | #endif | ||
2145 | |||
2120 | extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask); | 2146 | extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask); |
2121 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); | 2147 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); |
2122 | 2148 | ||