]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ftrace: add pretty print to selected fuction traces
authorSteven Rostedt <srostedt@redhat.com>
Tue, 17 Feb 2009 04:06:01 +0000 (23:06 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Tue, 17 Feb 2009 04:06:01 +0000 (23:06 -0500)
This patch adds a call back for the tracers that have hooks to
selected functions. This allows the tracer to show better output
in the set_ftrace_filter file.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
include/linux/ftrace.h
kernel/trace/ftrace.c

index 13918c4400ad1b61d58f2a51834da6f1f2e9b895..b331e216d8a1a8fef4cc25725d9d5e35a160fbd4 100644 (file)
@@ -106,12 +106,18 @@ struct ftrace_func_command {
 /* asm/ftrace.h must be defined for archs supporting dynamic ftrace */
 #include <asm/ftrace.h>
 
+struct seq_file;
+
 struct ftrace_hook_ops {
        void                    (*func)(unsigned long ip,
                                        unsigned long parent_ip,
                                        void **data);
        int                     (*callback)(unsigned long ip, void **data);
        void                    (*free)(void **data);
+       int                     (*print)(struct seq_file *m,
+                                        unsigned long ip,
+                                        struct ftrace_hook_ops *ops,
+                                        void *data);
 };
 
 extern int
index 1e058848cddb5469205790df254ce5c44d8e7a08..6533c1d20155c54365f0ecd6e94f2a3deaec977e 100644 (file)
@@ -834,6 +834,9 @@ static int t_hash_show(struct seq_file *m, void *v)
 
        rec = hlist_entry(hnd, struct ftrace_func_hook, node);
 
+       if (rec->ops->print)
+               return rec->ops->print(m, rec->ip, rec->ops, rec->data);
+
        kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
        seq_printf(m, "%s:", str);