Linux-rt-users archive on
 help / color / Atom feed
From: Masami Hiramatsu <>
To: Steven Rostedt <>
Cc: Masami Hiramatsu <>,
	Tom Zanussi <>,,,
Subject: [PATCH] tracing: Skip software disabled event at __synth_event_trace_end()
Date: Wed, 12 Feb 2020 14:54:19 +0900
Message-ID: <158148685911.20407.3538292497442671878.stgit@devnote2> (raw)

When the synthetic event is software disabled,
__synth_event_trace_start() does not allocate an event buffer.
In this case __synth_event_trace_end() also should not commit
the buffer.

Check the trace_state->disabled at __synth_event_trace_end()
and if it is disabled, skip it.

Signed-off-by: Masami Hiramatsu <>
 kernel/trace/trace_events_hist.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 483b3fd1094f..781e4b55e117 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1847,6 +1847,9 @@ __synth_event_trace_start(struct trace_event_file *file,
 static inline void
 __synth_event_trace_end(struct synth_event_trace_state *trace_state)
+	if (trace_state->disabled)
+		return;

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12  5:54 Masami Hiramatsu [this message]
2020-02-12 16:03 ` Tom Zanussi
2020-02-17  9:33 ` Masami Hiramatsu

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=158148685911.20407.3538292497442671878.stgit@devnote2 \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-rt-users archive on

Archives are clonable:
	git clone --mirror linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ \
	public-inbox-index linux-rt-users

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone