diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-05-09 16:54:59 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-07-01 07:13:32 -0400 |
commit | 9674b2fadab636b1fe27b282f9a9fa0f9d8c9839 (patch) | |
tree | d20059fdcca82f88b45c17f1ef99dc399c19449d /kernel/trace | |
parent | 79922b8009c074e30d3a97f5a24519f11814ad03 (diff) |
ftrace: Add trampolines to enabled_functions debug file
The enabled_functions is used to help debug the dynamic function tracing.
Adding what trampolines are attached to files is useful for debugging.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 5d15eb8146a7..3ded796e10e0 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2903,10 +2903,22 @@ static int t_show(struct seq_file *m, void *v) | |||
2903 | return 0; | 2903 | return 0; |
2904 | 2904 | ||
2905 | seq_printf(m, "%ps", (void *)rec->ip); | 2905 | seq_printf(m, "%ps", (void *)rec->ip); |
2906 | if (iter->flags & FTRACE_ITER_ENABLED) | 2906 | if (iter->flags & FTRACE_ITER_ENABLED) { |
2907 | seq_printf(m, " (%ld)%s", | 2907 | seq_printf(m, " (%ld)%s", |
2908 | ftrace_rec_count(rec), | 2908 | ftrace_rec_count(rec), |
2909 | rec->flags & FTRACE_FL_REGS ? " R" : ""); | 2909 | rec->flags & FTRACE_FL_REGS ? " R" : " "); |
2910 | if (rec->flags & FTRACE_FL_TRAMP_EN) { | ||
2911 | struct ftrace_ops *ops; | ||
2912 | |||
2913 | ops = ftrace_find_tramp_ops_curr(rec); | ||
2914 | if (ops && ops->trampoline) | ||
2915 | seq_printf(m, "\ttramp: %pS", | ||
2916 | (void *)ops->trampoline); | ||
2917 | else | ||
2918 | seq_printf(m, "\ttramp: ERROR!"); | ||
2919 | } | ||
2920 | } | ||
2921 | |||
2910 | seq_printf(m, "\n"); | 2922 | seq_printf(m, "\n"); |
2911 | 2923 | ||
2912 | return 0; | 2924 | return 0; |