Re: [PATCH v3 2/8] tracing/ftrace: guard syscall probe with preempt_notrace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri,  4 Oct 2024 10:58:12 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:

> +		      PARAMS(assign), PARAMS(print))			\
> +static notrace void							\
> +trace_event_raw_event_##call(void *__data, proto)			\
> +{									\
> +	guard(preempt_notrace)();					\
> +	do_trace_event_raw_event_##call(__data, args);			\
> +}
> +

Do we really need to use "guard()" for a single line function? Why make the
compiler do more work?

static notrace void							\
trace_event_raw_event_##call(void *__data, proto)			\
{									\
	preempt_disable_notrace();					\
	do_trace_event_raw_event_##call(__data, args);			\
	preempt_enable_notrace();					\
}

Is more readable.

-- Steve




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux