From: Namhyung Kim <[email protected]>

When there's no entry in set_graph_notrace, it'll print below message

  #### all functions enabled ####

While this is technically correct, it's better to print like below:

  #### no functions disabled ####

Link: 
http://lkml.kernel.org/p/[email protected]

Reported-by: Naoya Horiguchi <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
---
 kernel/trace/ftrace.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 17885a27281c..ee245c0659a6 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4089,7 +4089,12 @@ static int g_show(struct seq_file *m, void *v)
                return 0;
 
        if (ptr == (unsigned long *)1) {
-               seq_printf(m, "#### all functions enabled ####\n");
+               struct ftrace_graph_data *fgd = m->private;
+
+               if (fgd->table == ftrace_graph_funcs)
+                       seq_printf(m, "#### all functions enabled ####\n");
+               else
+                       seq_printf(m, "#### no functions disabled ####\n");
                return 0;
        }
 
-- 
2.0.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to