linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: rostedt@goodmis.org
Cc: masami.hiramatsu.pt@hitachi.com, linux-kernel@vger.kernel.org,
	Tom Zanussi <tom.zanussi@linux.intel.com>
Subject: [PATCH 04/11] tracing: fix disabling of soft disable
Date: Thu, 20 Jun 2013 13:31:28 -0500	[thread overview]
Message-ID: <f369f565dc440f40f027de0387c99dda4d36154e.1371751701.git.tom.zanussi@linux.intel.com> (raw)
In-Reply-To: <cover.1371751701.git.tom.zanussi@linux.intel.com>
In-Reply-To: <cover.1371751701.git.tom.zanussi@linux.intel.com>

The comment on the soft disable 'disable' case of
__ftrace_event_enable_disable() states that the soft disable bit
should be cleared in that case, but currently only the soft mode bit
is actually cleared.

This essentially leaves the standard non-soft-enable enable/disable
paths as the only way to clear the soft disable flag, but the soft
disable bit should also be cleared when removing a trigger with '!'.

Also, the SOFT_DISABLED bit should never be set if SOFT_MODE is
cleared.

This fixes the above discrepancies.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 kernel/trace/trace_events.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index ecb2609..f9738dc 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -282,6 +282,8 @@ static int __ftrace_event_enable_disable(struct ftrace_event_file *file,
 		/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT */
 		if (file->flags & FTRACE_EVENT_FL_SOFT_MODE)
 			set_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
+		else
+			clear_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
 		break;
 	case 1:
 		/*
-- 
1.7.11.4


  parent reply	other threads:[~2013-06-20 18:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 18:31 [PATCH 00/11] tracing: trace event triggers Tom Zanussi
2013-06-20 18:31 ` [PATCH 01/11] tracing: simplify event_enable_read() Tom Zanussi
2013-06-21  6:52   ` Masami Hiramatsu
2013-06-20 18:31 ` [PATCH 02/11] tracing: add missing syscall_metadata comment Tom Zanussi
2013-06-21  7:06   ` Masami Hiramatsu
2013-06-21 19:48     ` Steven Rostedt
2013-06-20 18:31 ` [PATCH 03/11] tracing: add soft disable for syscall events Tom Zanussi
2013-06-21  6:53   ` zhangwei(Jovi)
2013-06-21 20:22     ` Steven Rostedt
2013-06-22  5:08       ` Jovi Zhang
2013-06-22 11:45         ` Steven Rostedt
2013-06-20 18:31 ` Tom Zanussi [this message]
2013-06-21 11:12   ` [PATCH 04/11] tracing: fix disabling of soft disable Masami Hiramatsu
2013-06-21 20:39     ` Steven Rostedt
2013-06-21 21:14       ` Tom Zanussi
2013-06-22  5:25         ` Tom Zanussi
2013-07-01 11:38           ` Masami Hiramatsu
2013-06-20 18:31 ` [PATCH 05/11] tracing: add basic event trigger framework Tom Zanussi
2013-06-21 12:12   ` Masami Hiramatsu
2013-06-20 18:31 ` [PATCH 06/11] tracing: add 'traceon' and 'traceoff' event trigger commands Tom Zanussi
2013-06-20 18:31 ` [PATCH 07/11] tracing: add 'snapshot' event trigger command Tom Zanussi
2013-06-20 18:31 ` [PATCH 08/11] tracing: add 'stacktrace' " Tom Zanussi
2013-06-20 18:31 ` [PATCH 09/11] tracing: add 'enable_event' and 'disable_event' event trigger commands Tom Zanussi
2013-06-20 18:31 ` [PATCH 10/11] tracing: add and use generic set_trigger_filter() implementation Tom Zanussi
2013-06-21  4:18   ` Masami Hiramatsu
2013-06-21 17:59     ` Tom Zanussi
2013-06-22 11:53       ` Steven Rostedt
2013-06-20 18:31 ` [PATCH 11/11] tracing: add documentation for trace event triggers Tom Zanussi
2013-06-21 19:45 ` [PATCH 00/11] tracing: " Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f369f565dc440f40f027de0387c99dda4d36154e.1371751701.git.tom.zanussi@linux.intel.com \
    --to=tom.zanussi@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).