Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1297888
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [for-next][PATCH 02/13] ftrace: Fix output of enabled_functions for showing tramp |
| Date | 2015-12-24 15:40 +0100 |
| Message-ID | <qJfdE-7VC-21@gated-at.bofh.it> (permalink) |
| References | <qJf3Y-7QW-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
When showing all tramps registered to a ftrace record in the file
enabled_functions, it exits the loop with ops == NULL. But then it is
suppose to show the function on the ops->trampoline and
add_trampoline_func() is called with the given ops. But because ops is now
NULL (to exit the loop), it always shows the static trampoline instead of
the one that is really registered to the record.
The call to add_trampoline_func() that shows the trampoline for the given
ops needs to be called at every iteration.
Fixes: 39daa7b9e895 "ftrace: Show all tramps registered to a record on ftrace_bug()"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ftrace.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b8dfe8138aa2..bf7bebcdad82 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3322,7 +3322,7 @@ static int t_show(struct seq_file *m, void *v)
seq_printf(m, "%ps", (void *)rec->ip);
if (iter->flags & FTRACE_ITER_ENABLED) {
- struct ftrace_ops *ops = NULL;
+ struct ftrace_ops *ops;
seq_printf(m, " (%ld)%s%s",
ftrace_rec_count(rec),
@@ -3335,13 +3335,14 @@ static int t_show(struct seq_file *m, void *v)
seq_printf(m, "\ttramp: %pS (%pS)",
(void *)ops->trampoline,
(void *)ops->func);
+ add_trampoline_func(m, ops, rec);
ops = ftrace_find_tramp_ops_next(rec, ops);
} while (ops);
} else
seq_puts(m, "\ttramp: ERROR!");
-
+ } else {
+ add_trampoline_func(m, NULL, rec);
}
- add_trampoline_func(m, ops, rec);
}
seq_putc(m, '\n');
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[for-next][PATCH 00/13] tracing: More updates for 4.5. Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 06/13] tracing: Use seq_buf_used() in seq_buf_to_user() instead of len Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 01/13] ftrace: Fix a typo in comment Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 12/13] metag: ftrace: Fix the comments for ftrace_modify_code Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 03/13] ftrace: Remove use of control list and ops Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 07/13] tracing: Introduce TRACE_EVENT_FN_COND macro Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 04/13] ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 13/13] tracing: Fix comment to use tracing_on over tracing_enable Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 09/13] ftrace: Clean up ftrace_module_init() code Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 10/13] ia64: ftrace: Fix the comments for ftrace_modify_code() Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 02/13] ftrace: Fix output of enabled_functions for showing tramp Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100
csiph-web