Messages in this thread Patch in this message | | | Date | Thu, 14 Aug 2008 22:47:17 -0400 | From | Steven Rostedt <> | Subject | [PATCH 1/3] ftrace: do not show freed records in available_filter_functions |
| |
Seems that freed records can appear in the available_filter_functions list. This patch fixes that.
CC: Abhishek Sagar <sagar.abhishek@gmail.com> Signed-off-by: Steven Rostedt <srostedt@redhat.com> --- kernel/trace/ftrace.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
Index: linux-tip.git/kernel/trace/ftrace.c =================================================================== --- linux-tip.git.orig/kernel/trace/ftrace.c 2008-08-14 22:43:01.000000000 -0400 +++ linux-tip.git/kernel/trace/ftrace.c 2008-08-14 22:43:03.000000000 -0400 @@ -879,15 +879,13 @@ t_next(struct seq_file *m, void *v, loff } } else { rec = &iter->pg->records[iter->idx++]; - if ((!(iter->flags & FTRACE_ITER_FAILURES) && + if ((rec->flags & FTRACE_FL_FREE) || + + (!(iter->flags & FTRACE_ITER_FAILURES) && (rec->flags & FTRACE_FL_FAILED)) || ((iter->flags & FTRACE_ITER_FAILURES) && - (!(rec->flags & FTRACE_FL_FAILED) || - (rec->flags & FTRACE_FL_FREE))) || - - ((iter->flags & FTRACE_ITER_FILTER) && - !(rec->flags & FTRACE_FL_FILTER)) || + !(rec->flags & FTRACE_FL_FAILED)) || ((iter->flags & FTRACE_ITER_NOTRACE) && !(rec->flags & FTRACE_FL_NOTRACE))) { --
| |