Skip to content

Commit

Permalink
ftrace: use ftrace_release for all dynamic ftrace functions
Browse files Browse the repository at this point in the history
ftrace_release is necessary for all uses of dynamic ftrace and not just
the archs that have CONFIG_FTRACE_MCOUNT_RECORD defined.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Oct 14, 2008
1 parent d3ee6d9 commit c0719e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,18 @@ extern void mcount_call(void);

extern int skip_trace(unsigned long ip);

void ftrace_disable_daemon(void);
void ftrace_enable_daemon(void);
extern void ftrace_release(void *start, unsigned long size);

extern void ftrace_disable_daemon(void);
extern void ftrace_enable_daemon(void);

#else
# define skip_trace(ip) ({ 0; })
# define ftrace_force_update() ({ 0; })
# define ftrace_set_filter(buf, len, reset) do { } while (0)
# define ftrace_disable_daemon() do { } while (0)
# define ftrace_enable_daemon() do { } while (0)
static inline void ftrace_release(void *start, unsigned long size) { }
#endif /* CONFIG_DYNAMIC_FTRACE */

/* totally disable ftrace - can not re-enable after this */
Expand Down Expand Up @@ -199,12 +202,10 @@ static inline void ftrace_dump(void) { }
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
extern void ftrace_init(void);
extern void ftrace_init_module(unsigned long *start, unsigned long *end);
extern void ftrace_release(void *start, unsigned long size);
#else
static inline void ftrace_init(void) { }
static inline void
ftrace_init_module(unsigned long *start, unsigned long *end) { }
static inline void ftrace_release(void *start, unsigned long size) { }
#endif


Expand Down

0 comments on commit c0719e5

Please sign in to comment.