Patchwork [085/118] tracing: Reset ftrace_graph_filter_enabled if count is zero

login
register
mail settings
Submitter Luis Henriques
Date May 7, 2013, 1:38 p.m.
Message ID <1367933964-1564-86-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/242265/
State New
Headers show

Comments

Luis Henriques - May 7, 2013, 1:38 p.m.
3.5.7.12 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Namhyung Kim <namhyung.kim@lge.com>

commit 9f50afccfdc15d95d7331acddcb0f7703df089ae upstream.

The ftrace_graph_count can be decreased with a "!" pattern, so that
the enabled flag should be updated too.

Link: http://lkml.kernel.org/r/1365663698-2413-1-git-send-email-namhyung@kernel.org

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 kernel/trace/ftrace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 80b2000..36759bf 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3579,7 +3579,8 @@  out:
 	if (fail)
 		return -EINVAL;
 
-	ftrace_graph_filter_enabled = 1;
+	ftrace_graph_filter_enabled = !!(*idx);
+
 	return 0;
 }