lkml.org 
[lkml]   [2023]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] bus: mhi: host: Add tracing support
On Fri, 20 Oct 2023 09:03:59 -0600
Jeffrey Hugo <quic_jhugo@quicinc.com> wrote:

> > diff --git a/drivers/bus/mhi/host/init.c b/drivers/bus/mhi/host/init.c
> > index f78aefd2d7a3..3afa90a204fd 100644
> > --- a/drivers/bus/mhi/host/init.c
> > +++ b/drivers/bus/mhi/host/init.c
> > @@ -20,6 +20,9 @@
> > #include <linux/wait.h>
> > #include "internal.h"
> >
> > +#define CREATE_TRACE_POINTS
> > +#include <trace/events/mhi_host.h>
>
> This feels redundant to me. A few lines ago we included internal.h, and
> internal.h includes trace/events/mhi_host.h

It's not redundant. The #define CREATE_TRACE_POINTS enables the magic of
creating the tracepoints and trace events via the TRACE_EVENT() macro.

It should never be done in a header file, only in .c code!

The header file include of trace headers are used for having access to the
declarations of the functions. That is (trace_*()) in the code.

-- Steve

\
 
 \ /
  Last update: 2023-10-20 18:29    [W:0.250 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site