diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-06-06 13:45:31 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-07-31 10:29:57 -0400 |
commit | 4dc936769e8a6382a4cc12375e8a4daa2b829fda (patch) | |
tree | 402e75bf6edb5761ea4c2312778d137c0e0dcf44 /include/linux/ftrace.h | |
parent | 25764288d8dc4792f0f487baf043ccfee5d8c2ba (diff) |
ftrace: Make ftrace_location() a nop on !DYNAMIC_FTRACE
When CONFIG_DYNAMIC_FTRACE is not set, ftrace_location() is not defined.
If a user (like kprobes) references this function, it will break
the compile when CONFIG_DYNAMIC_FTRACE is not set.
Add ftrace_location() as a nop (return 0) when DYNAMIC_FTRACE
is not defined.
Link: http://lkml.kernel.org/r/20120612225426.961092717@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 3e711122f66c..a52f2f4fe030 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -520,7 +520,7 @@ extern int skip_trace(unsigned long ip); | |||
520 | 520 | ||
521 | extern void ftrace_disable_daemon(void); | 521 | extern void ftrace_disable_daemon(void); |
522 | extern void ftrace_enable_daemon(void); | 522 | extern void ftrace_enable_daemon(void); |
523 | #else | 523 | #else /* CONFIG_DYNAMIC_FTRACE */ |
524 | static inline int skip_trace(unsigned long ip) { return 0; } | 524 | static inline int skip_trace(unsigned long ip) { return 0; } |
525 | static inline int ftrace_force_update(void) { return 0; } | 525 | static inline int ftrace_force_update(void) { return 0; } |
526 | static inline void ftrace_disable_daemon(void) { } | 526 | static inline void ftrace_disable_daemon(void) { } |
@@ -538,6 +538,10 @@ static inline int ftrace_text_reserved(void *start, void *end) | |||
538 | { | 538 | { |
539 | return 0; | 539 | return 0; |
540 | } | 540 | } |
541 | static inline unsigned long ftrace_location(unsigned long ip) | ||
542 | { | ||
543 | return 0; | ||
544 | } | ||
541 | 545 | ||
542 | /* | 546 | /* |
543 | * Again users of functions that have ftrace_ops may not | 547 | * Again users of functions that have ftrace_ops may not |