stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Tom Zanussi <zanussi@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] tracing: Have syscall trace events use trace_event_buffer_lock_reserve()
Date: Mon, 10 Jan 2022 16:06:49 +0900	[thread overview]
Message-ID: <20220110160649.996b79e9153ab8add26f7fc6@kernel.org> (raw)
In-Reply-To: <20220107225839.823118570@goodmis.org>

On Fri, 07 Jan 2022 17:56:56 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: Steven Rostedt <rostedt@goodmis.org>
> 
> Currently, the syscall trace events call trace_buffer_lock_reserve()
> directly, which means that it misses out on some of the filtering
> optimizations provided by the helper function
> trace_event_buffer_lock_reserve(). Have the syscall trace events call that
> instead, as it was missed when adding the update to use the temp buffer
> when filtering.

Looks good to me.

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Thank you,

> 
> Cc: stable@vger.kernel.org
> Fixes: 0fc1b09ff1ff4 ("tracing: Use temp buffer when filtering events")
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
>  kernel/trace/trace_syscalls.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
> index 8bfcd3b09422..f755bde42fd0 100644
> --- a/kernel/trace/trace_syscalls.c
> +++ b/kernel/trace/trace_syscalls.c
> @@ -323,8 +323,7 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
>  
>  	trace_ctx = tracing_gen_ctx();
>  
> -	buffer = tr->array_buffer.buffer;
> -	event = trace_buffer_lock_reserve(buffer,
> +	event = trace_event_buffer_lock_reserve(&buffer, trace_file,
>  			sys_data->enter_event->event.type, size, trace_ctx);
>  	if (!event)
>  		return;
> @@ -367,8 +366,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
>  
>  	trace_ctx = tracing_gen_ctx();
>  
> -	buffer = tr->array_buffer.buffer;
> -	event = trace_buffer_lock_reserve(buffer,
> +	event = trace_event_buffer_lock_reserve(&buffer, trace_file,
>  			sys_data->exit_event->event.type, sizeof(*entry),
>  			trace_ctx);
>  	if (!event)
> -- 
> 2.33.0


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2022-01-10  7:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220107225655.647376947@goodmis.org>
2022-01-07 22:56 ` [PATCH 1/2] tracing: Have syscall trace events use trace_event_buffer_lock_reserve() Steven Rostedt
2022-01-10  7:06   ` Masami Hiramatsu [this message]
2022-01-07 22:56 ` [PATCH 2/2] tracing: Add test for user space strings when filtering on string pointers Steven Rostedt
2022-01-08 19:04   ` kernel test robot
2022-01-10  3:15   ` Pingfan Liu
2022-01-10 15:34     ` Steven Rostedt
2022-01-11 20:49   ` Sven Schnelle

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=20220110160649.996b79e9153ab8add26f7fc6@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    --cc=zanussi@kernel.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).