ok, thanks.

________________________________
发件人: Steven Rostedt <[email protected]>
发送时间: 2025年12月16日 4:30:31
收件人: Xiang Gao
抄送: [email protected]; [email protected]; [email protected]; 
[email protected]; [email protected]; 
[email protected]; [email protected]; 
[email protected]; [email protected]; [email protected]; 
[email protected]; [email protected]; 高翔
主题: [External Mail]Re: [PATCH v5] dma-buf: add some tracepoints to debug.

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给[email protected]进行反馈

On Mon,  1 Dec 2025 19:21:48 +0800
Xiang Gao <[email protected]> wrote:

> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -35,6 +35,17 @@
>
>  #include "dma-buf-sysfs-stats.h"
>
> +#define CREATE_TRACE_POINTS
> +#include <trace/events/dma_buf.h>
> +

From a tracing point of view I'm OK with this patch, but this macro really
needs a comment.

-- Steve


> +#define DMA_BUF_TRACE(FUNC, ...)                  \
> +    do {                                          \
> +        if (FUNC##_enabled()) {                   \
> +            guard(spinlock)(&dmabuf->name_lock); \
> +            FUNC(__VA_ARGS__);                    \
> +        }                                         \
> +    } while (0)
> +
>  static inline int is_dma_buf_file(struct file *);
>
>  static DEFINE_MUTEX(dmabuf_list_mutex);

Reply via email to