diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-07-29 11:51:13 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-06 01:28:05 -0400 |
commit | c0a0d0d3f65284c71115a9bb1ed801ee33eeb552 (patch) | |
tree | ac4c74e18c73f368abc8721f8f04c9101069fcaf /kernel/trace/trace.h | |
parent | 5e5bf483986ad86ad25f25eec5299c86eb2d1c57 (diff) |
tracing/core: Make the stack entry helpers global
Make the stacktrace event insertion helpers globals.
This has two effects:
- Prepare for moving the sched events insertion helpers to
the sched switch tracer file.
- Move some ifdef outside function definitions
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index c7e92732982d..116524d62366 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -489,9 +489,31 @@ void update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu); | |||
489 | void update_max_tr_single(struct trace_array *tr, | 489 | void update_max_tr_single(struct trace_array *tr, |
490 | struct task_struct *tsk, int cpu); | 490 | struct task_struct *tsk, int cpu); |
491 | 491 | ||
492 | void __trace_stack(struct trace_array *tr, | 492 | #ifdef CONFIG_STACKTRACE |
493 | unsigned long flags, | 493 | void ftrace_trace_stack(struct trace_array *tr, unsigned long flags, |
494 | int skip, int pc); | 494 | int skip, int pc); |
495 | |||
496 | void ftrace_trace_userstack(struct trace_array *tr, unsigned long flags, | ||
497 | int pc); | ||
498 | |||
499 | void __trace_stack(struct trace_array *tr, unsigned long flags, int skip, | ||
500 | int pc); | ||
501 | #else | ||
502 | static inline void ftrace_trace_stack(struct trace_array *tr, | ||
503 | unsigned long flags, int skip, int pc) | ||
504 | { | ||
505 | } | ||
506 | |||
507 | static inline void ftrace_trace_userstack(struct trace_array *tr, | ||
508 | unsigned long flags, int pc) | ||
509 | { | ||
510 | } | ||
511 | |||
512 | static inline void __trace_stack(struct trace_array *tr, unsigned long flags, | ||
513 | int skip, int pc) | ||
514 | { | ||
515 | } | ||
516 | #endif /* CONFIG_STACKTRACE */ | ||
495 | 517 | ||
496 | extern cycle_t ftrace_now(int cpu); | 518 | extern cycle_t ftrace_now(int cpu); |
497 | 519 | ||