mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>
Cc: Krishna chaitanya chundru <quic_krichai@quicinc.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	<linux-kernel@vger.kernel.org>, <mhi@lists.linux.dev>,
	<linux-arm-msm@vger.kernel.org>,
	<linux-trace-kernel@vger.kernel.org>, <quic_vbadigan@quicinc.com>,
	<quic_ramkri@quicinc.com>, <quic_nitegupt@quicinc.com>,
	<quic_skananth@quicinc.com>, <quic_parass@quicinc.com>
Subject: Re: [PATCH v2] bus: mhi: host: Add tracing support
Date: Fri, 20 Oct 2023 12:28:33 -0400	[thread overview]
Message-ID: <20231020122833.647bbc49@gandalf.local.home> (raw)
In-Reply-To: <9216f694-cce0-2b95-df34-e5b60538644a@quicinc.com>

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

  reply	other threads:[~2023-10-20 16:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13  9:52 Krishna chaitanya chundru
2023-10-16 15:13 ` Steven Rostedt
2023-10-17  9:08   ` Krishna Chaitanya Chundru
2023-10-17  8:21 ` kernel test robot
2023-10-20  3:27 ` kernel test robot
2023-10-20 15:03 ` Jeffrey Hugo
2023-10-20 16:28   ` Steven Rostedt [this message]
2023-10-23  7:11   ` Krishna Chaitanya Chundru
     [not found]     ` <baf17652-e2e8-0083-459e-a6ea4372466b@quicinc.com>
2023-10-30  7:18       ` Krishna Chaitanya Chundru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231020122833.647bbc49@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mhi@lists.linux.dev \
    --cc=mhiramat@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    --cc=quic_krichai@quicinc.com \
    --cc=quic_nitegupt@quicinc.com \
    --cc=quic_parass@quicinc.com \
    --cc=quic_ramkri@quicinc.com \
    --cc=quic_skananth@quicinc.com \
    --cc=quic_vbadigan@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®