ftrace: Add a ftrace_free_mem() function for modules to use

In order to be able to trace module init functions, the module code needs to
tell ftrace what is being freed when the init sections are freed. Use the
code that the main init calls to tell ftrace to free the main init sections.
This requires passing in a start and end address to free.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt (VMware)
2017-06-20 10:44:58 -04:00
parent 5819eaddf3
commit 6cafbe1594
2 changed files with 13 additions and 3 deletions

View File

@@ -151,8 +151,10 @@ struct ftrace_ops_hash {
};
void ftrace_free_init_mem(void);
void ftrace_free_mem(void *start, void *end);
#else
static inline void ftrace_free_init_mem(void) { }
static inline void ftrace_free_mem(void *start, void *end) { }
#endif
/*