File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ static inline void early_trace_init(void) { }
8282
8383struct module ;
8484struct ftrace_hash ;
85+ struct ftrace_func_entry ;
8586
8687#if defined(CONFIG_FUNCTION_TRACER ) && defined(CONFIG_MODULES ) && \
8788 defined(CONFIG_DYNAMIC_FTRACE )
@@ -405,6 +406,14 @@ enum ftrace_ops_cmd {
405406typedef int (* ftrace_ops_func_t )(struct ftrace_ops * op , enum ftrace_ops_cmd cmd );
406407
407408#ifdef CONFIG_DYNAMIC_FTRACE
409+
410+ #define FTRACE_HASH_DEFAULT_BITS 10
411+
412+ struct ftrace_hash * alloc_ftrace_hash (int size_bits );
413+ void free_ftrace_hash (struct ftrace_hash * hash );
414+ struct ftrace_func_entry * add_hash_entry_direct (struct ftrace_hash * hash ,
415+ unsigned long ip , unsigned long direct );
416+
408417/* The hash used to know what functions callbacks trace */
409418struct ftrace_ops_hash {
410419 struct ftrace_hash __rcu * notrace_hash ;
Original file line number Diff line number Diff line change 6868 })
6969
7070/* hash bits for specific function selection */
71- #define FTRACE_HASH_DEFAULT_BITS 10
7271#define FTRACE_HASH_MAX_BITS 12
7372
7473#ifdef CONFIG_DYNAMIC_FTRACE
@@ -1185,7 +1184,7 @@ static void __add_hash_entry(struct ftrace_hash *hash,
11851184 hash -> count ++ ;
11861185}
11871186
1188- static struct ftrace_func_entry *
1187+ struct ftrace_func_entry *
11891188add_hash_entry_direct (struct ftrace_hash * hash , unsigned long ip , unsigned long direct )
11901189{
11911190 struct ftrace_func_entry * entry ;
@@ -1265,7 +1264,7 @@ static void clear_ftrace_mod_list(struct list_head *head)
12651264 mutex_unlock (& ftrace_lock );
12661265}
12671266
1268- static void free_ftrace_hash (struct ftrace_hash * hash )
1267+ void free_ftrace_hash (struct ftrace_hash * hash )
12691268{
12701269 if (!hash || hash == EMPTY_HASH )
12711270 return ;
@@ -1305,7 +1304,7 @@ void ftrace_free_filter(struct ftrace_ops *ops)
13051304}
13061305EXPORT_SYMBOL_GPL (ftrace_free_filter );
13071306
1308- static struct ftrace_hash * alloc_ftrace_hash (int size_bits )
1307+ struct ftrace_hash * alloc_ftrace_hash (int size_bits )
13091308{
13101309 struct ftrace_hash * hash ;
13111310 int size ;
You can’t perform that action at this time.
0 commit comments