aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-06-13 03:24:06 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-07-01 07:13:44 -0400
commit8c006cf7a2130c4bfb600ae3a496910115804641 (patch)
tree0385220fc299ce43753f2477bb7d69c9666334e2
parent280d1429b6a67432ead24fb68a504b4c90c3d96d (diff)
tracing: Improve message of empty set_ftrace_notrace file
When there's no entry in set_ftrace_notrace, it'll print nothing, but it's better to print something like below like set_graph_notrace does: #### no functions disabled #### Link: http://lkml.kernel.org/p/1402644246-4649-1-git-send-email-namhyung@kernel.org Reported-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/trace/ftrace.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index ee245c0659a6..45aac1a742c5 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2835,8 +2835,10 @@ static void *t_start(struct seq_file *m, loff_t *pos)
2835 * off, we can short cut and just print out that all 2835 * off, we can short cut and just print out that all
2836 * functions are enabled. 2836 * functions are enabled.
2837 */ 2837 */
2838 if (iter->flags & FTRACE_ITER_FILTER && 2838 if ((iter->flags & FTRACE_ITER_FILTER &&
2839 ftrace_hash_empty(ops->filter_hash)) { 2839 ftrace_hash_empty(ops->filter_hash)) ||
2840 (iter->flags & FTRACE_ITER_NOTRACE &&
2841 ftrace_hash_empty(ops->notrace_hash))) {
2840 if (*pos > 0) 2842 if (*pos > 0)
2841 return t_hash_start(m, pos); 2843 return t_hash_start(m, pos);
2842 iter->flags |= FTRACE_ITER_PRINTALL; 2844 iter->flags |= FTRACE_ITER_PRINTALL;
@@ -2881,7 +2883,10 @@ static int t_show(struct seq_file *m, void *v)
2881 return t_hash_show(m, iter); 2883 return t_hash_show(m, iter);
2882 2884
2883 if (iter->flags & FTRACE_ITER_PRINTALL) { 2885 if (iter->flags & FTRACE_ITER_PRINTALL) {
2884 seq_printf(m, "#### all functions enabled ####\n"); 2886 if (iter->flags & FTRACE_ITER_NOTRACE)
2887 seq_printf(m, "#### no functions disabled ####\n");
2888 else
2889 seq_printf(m, "#### all functions enabled ####\n");
2885 return 0; 2890 return 0;
2886 } 2891 }
2887 2892