aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-10-31 07:57:20 -0400
committerIngo Molnar <mingo@elte.hu>2008-11-04 11:14:02 -0500
commit71566a0d161edec70361b7f90f6e54af6a6d5d05 (patch)
tree78d2d790ed4e20c179d2f61f2ed50ecbb6d5a451 /include/linux
parent7a895f53cda9d9362c30144e42c124a1ae996b9e (diff)
tracing/fastboot: Enable boot tracing only during initcalls
Impact: modify boot tracer We used to disable the initcall tracing at a specified time (IE: end of builtin initcalls). But we don't need it anymore. It will be stopped when initcalls are finished. However we want two things: _Start this tracing only after pre-smp initcalls are finished. _Since we are planning to trace sched_switches at the same time, we want to enable them only during the initcall execution. For this purpose, this patch introduce two functions to enable/disable the sched_switch tracing during boot. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ftrace.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index e46a7b34037c..4642959e5bda 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -234,6 +234,11 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { }
234#endif 234#endif
235 235
236 236
237/*
238 * Structure which defines the trace of an initcall.
239 * You don't have to fill the func field since it is
240 * only used internally by the tracer.
241 */
237struct boot_trace { 242struct boot_trace {
238 pid_t caller; 243 pid_t caller;
239 char func[KSYM_NAME_LEN]; 244 char func[KSYM_NAME_LEN];
@@ -244,13 +249,28 @@ struct boot_trace {
244}; 249};
245 250
246#ifdef CONFIG_BOOT_TRACER 251#ifdef CONFIG_BOOT_TRACER
252/* Append the trace on the ring-buffer */
247extern void trace_boot(struct boot_trace *it, initcall_t fn); 253extern void trace_boot(struct boot_trace *it, initcall_t fn);
254
255/* Tells the tracer that smp_pre_initcall is finished.
256 * So we can start the tracing
257 */
248extern void start_boot_trace(void); 258extern void start_boot_trace(void);
249extern void stop_boot_trace(void); 259
260/* Resume the tracing of other necessary events
261 * such as sched switches
262 */
263extern void enable_boot_trace(void);
264
265/* Suspend this tracing. Actually, only sched_switches tracing have
266 * to be suspended. Initcalls doesn't need it.)
267 */
268extern void disable_boot_trace(void);
250#else 269#else
251static inline void trace_boot(struct boot_trace *it, initcall_t fn) { } 270static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
252static inline void start_boot_trace(void) { } 271static inline void start_boot_trace(void) { }
253static inline void stop_boot_trace(void) { } 272static inline void enable_boot_trace(void) { }
273static inline void disable_boot_trace(void) { }
254#endif 274#endif
255 275
256 276