From: Namhyung Kim Date: Thu, 12 Jun 2014 16:23:51 +0000 (+0900) Subject: tracing: Improve message of empty set_graph_notrace file X-Git-Tag: v5.15~17515^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=280d1429b6a67432ead24fb68a504b4c90c3d96d;p=platform%2Fkernel%2Flinux-starfive.git tracing: Improve message of empty set_graph_notrace file 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/1402590233-22321-3-git-send-email-namhyung@kernel.org Reported-by: Naoya Horiguchi Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt --- diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 17885a2..ee245c0 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; }