Re: [PATCH v3 2/4] ftrace: Add support for function argument to graph tracer

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

 



On Wed, 26 Feb 2025 23:48:52 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> > -	event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT,
> > -					  sizeof(*entry), trace_ctx);
> > +	/* If fregs is defined, add FTRACE_REGS_MAX_ARGS long size words */
> > +	size = sizeof(*entry) + (FTRACE_REGS_MAX_ARGS * !!fregs * sizeof(long));  
> 
> Is `!!fregs` always 1 if fregs != NULL? (seems to depend on compiler)

Yes, C guarantees that ! is either 1 or zero. If you want to convert
something from non zero to 1, the C convention is "!!".

> 
> Others looks good to me.
> 
> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>


Thanks!

-- 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