aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/ftrace.h6
-rw-r--r--kernel/trace/ftrace.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 13918c4400ad..b331e216d8a1 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -106,12 +106,18 @@ struct ftrace_func_command {
106/* asm/ftrace.h must be defined for archs supporting dynamic ftrace */ 106/* asm/ftrace.h must be defined for archs supporting dynamic ftrace */
107#include <asm/ftrace.h> 107#include <asm/ftrace.h>
108 108
109struct seq_file;
110
109struct ftrace_hook_ops { 111struct ftrace_hook_ops {
110 void (*func)(unsigned long ip, 112 void (*func)(unsigned long ip,
111 unsigned long parent_ip, 113 unsigned long parent_ip,
112 void **data); 114 void **data);
113 int (*callback)(unsigned long ip, void **data); 115 int (*callback)(unsigned long ip, void **data);
114 void (*free)(void **data); 116 void (*free)(void **data);
117 int (*print)(struct seq_file *m,
118 unsigned long ip,
119 struct ftrace_hook_ops *ops,
120 void *data);
115}; 121};
116 122
117extern int 123extern int
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1e058848cddb..6533c1d20155 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -834,6 +834,9 @@ static int t_hash_show(struct seq_file *m, void *v)
834 834
835 rec = hlist_entry(hnd, struct ftrace_func_hook, node); 835 rec = hlist_entry(hnd, struct ftrace_func_hook, node);
836 836
837 if (rec->ops->print)
838 return rec->ops->print(m, rec->ip, rec->ops, rec->data);
839
837 kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); 840 kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
838 seq_printf(m, "%s:", str); 841 seq_printf(m, "%s:", str);
839 842