DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: Jerin Jacob <jerinj@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	dev@dpdk.org
Subject: Re: [PATCH v4] eal: add build-time option to omit trace
Date: Tue, 24 Sep 2024 21:27:33 +0530	[thread overview]
Message-ID: <CALBAE1MwigJA+Vi=ZUTa_wCoKgWU2d3zzzY7CoUMTY82FsaT_A@mail.gmail.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F72A@smartserver.smartshare.dk>

On Tue, Sep 24, 2024 at 9:23 PM Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> > Sent: Tuesday, 24 September 2024 11.42
> >
> > On Tue, Sep 24, 2024 at 7:10 PM Morten Brørup <mb@smartsharesystems.com>
> > wrote:
> > >
> > > Some applications want to omit the trace feature.
> > > Either to reduce the memory footprint, to reduce the exposed attack
> > > surface, or for other reasons.
> > >
> > > This patch adds an option in rte_config.h to include or omit trace in
> > the
> > > build. Trace is included by default.
> > >
> > > Omitting trace works by omitting all trace points.
> > > For API and ABI compatibility, the trace feature itself remains.
> > >
> > > Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> > > ---
> > > v4:
> > > * Added check for generic trace enabled when registering trace points,
> > in
> > >   RTE_INIT. (Jerin Jacob)
> > > * Test application uses function instead of macro to check if generic
> > >   trace is enabled. (Jerin Jacob)
> > > * Performance test application uses function to check if generic trace
> > is
> > >   enabled.
> > > v3:
> > > * Simpler version with much fewer ifdefs. (Jerin Jacob)
> > > v2:
> > > * Added/modified macros required for building applications with trace
> > >   omitted.
> >
> > >
> > > +/**
> > > + * @internal
> >
> > Since it is used in app/test. Can we remove it as internal and make
> > symbol as rte_trace_point_is_enabled
>
> I don't think we should make functions public if only used for test purposes.
>
> Do you think it is useful for normal usage too? Does rte_trace_is_enabled() not suffice?

It will be good for an app to know, Is trace feature disabled if the
application cares about.
Yes. rte_trace_is_enabled() suffice.


>
> >
> > > + *
> > > + * Test if the tracepoint compile-time option is enabled.
> > > + *
> > > + * @return
> > > + *   true if tracepoint enabled, false otherwise.
> > > + */
> > > +__rte_experimental
> > > +static __rte_always_inline bool
> > > +__rte_trace_point_generic_is_enabled(void)
> >
> > Do we need to keep _generic_
>
> Other internal functions have _generic_ too, so I added it.
> If we decide to make it public, I agree _generic_ should be removed.
>
> >
> > Rest looks good to me.

      reply	other threads:[~2024-09-24 15:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18  8:55 [PATCH] " Morten Brørup
2024-09-18  9:49 ` Jerin Jacob
2024-09-18 10:23   ` Morten Brørup
2024-09-19  8:06 ` [PATCH v2] " Morten Brørup
2024-09-19  8:51   ` Jerin Jacob
2024-09-19 13:15     ` Morten Brørup
2024-09-19 13:54       ` Jerin Jacob
2024-09-19 15:35         ` Morten Brørup
2024-09-19 15:49           ` Jerin Jacob
2024-09-19 16:08             ` Morten Brørup
2024-09-19 16:34               ` Jerin Jacob
2024-09-20  9:08 ` [PATCH v3] " Morten Brørup
2024-09-23  8:39   ` Jerin Jacob
2024-09-24 13:50     ` Morten Brørup
2024-09-24 13:39 ` [PATCH v4] " Morten Brørup
2024-09-24 15:30   ` Stephen Hemminger
2024-09-24 15:41   ` Jerin Jacob
2024-09-24 15:53     ` Morten Brørup
2024-09-24 15:57       ` Jerin Jacob [this message]

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='CALBAE1MwigJA+Vi=ZUTa_wCoKgWU2d3zzzY7CoUMTY82FsaT_A@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mb@smartsharesystems.com \
    --cc=skori@marvell.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;
as well as URLs for NNTP newsgroup(s).