Skip to content

Commit f79e9f3

Browse files
rostedtgregkh
authored andcommitted
tracing: Have syscall trace events use trace_event_buffer_lock_reserve()
commit 3e2a56e upstream. 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. Link: https://lkml.kernel.org/r/20220107225839.823118570@goodmis.org Cc: stable@vger.kernel.org Cc: Ingo Molnar <mingo@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Tom Zanussi <zanussi@kernel.org> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Fixes: 0fc1b09 ("tracing: Use temp buffer when filtering events") Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7cf6dac commit f79e9f3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎kernel/trace/trace_syscalls.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,7 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
323323

324324
trace_ctx = tracing_gen_ctx();
325325

326-
buffer = tr->array_buffer.buffer;
327-
event = trace_buffer_lock_reserve(buffer,
326+
event = trace_event_buffer_lock_reserve(&buffer, trace_file,
328327
sys_data->enter_event->event.type, size, trace_ctx);
329328
if (!event)
330329
return;
@@ -367,8 +366,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
367366

368367
trace_ctx = tracing_gen_ctx();
369368

370-
buffer = tr->array_buffer.buffer;
371-
event = trace_buffer_lock_reserve(buffer,
369+
event = trace_event_buffer_lock_reserve(&buffer, trace_file,
372370
sys_data->exit_event->event.type, sizeof(*entry),
373371
trace_ctx);
374372
if (!event)

0 commit comments

Comments
 (0)