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, techboard@dpdk.org,
	Ferruh Yigit <ferruh.yigit@amd.com>
Subject: Re: [PATCH v2] eal: add build-time option to omit trace
Date: Thu, 19 Sep 2024 21:19:29 +0530	[thread overview]
Message-ID: <CALBAE1NwtP6DEaJjNDr7Dx9FAjr7FtjJrF9nrz43E1L0io_zDQ@mail.gmail.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F704@smartserver.smartshare.dk>

On Thu, Sep 19, 2024 at 9:05 PM Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > Could you share data with a real-world application of the elf size?
> > 1)Without any change
>
> Size of the statically linked executable on the target file system:
> 3,800,528 byte
>
> > 2)Only disabling via __rte_trace_point_emit_header_generic() .. aka below
> > patch.
>
> 3,572,032 byte
>
> > 3)Full disable.
>
> 3,572,032 byte
>
> >
> > I think, size command will spit out with different section's size.
> > This data can be used to take decision and to know how much % it
> > adding up?
>
> I.e. trace adds 228,496 byte = 6.4 % to the size of this specific executable.
>
> ~200 KB might not seem as much, but this is just omitting one module.
> If other unused modules also add ~200 KB, it adds up.
>
> And I haven't done any significant additional memory footprint tuning.
>
>
> > > > #define __rte_trace_point_emit_header_generic(t) \
> > > > void *mem; \
> > > > do { \
> > > >   +      if (RTE_TRACE == 0) \
> > > >   +             return \
>
> Tested without the RTE_TRACE==0 check, simply:
>   void *mem; \
>   do { \
> +         return; \
>           const uint64_t val = rte_atomic_load_explicit(t, rte_memory_order_acquire); \
>
> > > >         const uint64_t val = rte_atomic_load_explicit(t,
> > > > rte_memory_order_acquire); \
> > > >         if (likely(!(val & __RTE_TRACE_FIELD_ENABLE_MASK))) \
> > > >                 return; \
> > > >         mem = __rte_trace_mem_get(val); \
> > > >         if (unlikely(mem == NULL)) \
> > > >                 return; \
> > > >         mem = __rte_trace_point_emit_ev_header(mem, val); \
> > > > } while (0)
>
> I don't understand why your method uses as little memory as mine...

Compiler is start enough to understand those functions are NOP.


> My method should also omit the trace points themselves, with their names and numbers, and their initialization.
>
> I haven't looked deeper into it.
>
> If your method of omitting trace is as efficient as all my ifdefs, I also prefer your method.
> Simpler is better.
>

  reply	other threads:[~2024-09-19 15:49 UTC|newest]

Thread overview: 37+ 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 [this message]
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
2024-10-01 13:49         ` Morten Brørup
2024-10-01 14:05           ` Jerin Jacob
2024-10-01 14:14             ` Morten Brørup
2024-10-01 15:01               ` Jerin Jacob
2024-10-01 16:01                 ` Morten Brørup
2024-10-01 16:06                   ` Jerin Jacob
2024-10-01 16:15                     ` Morten Brørup
2024-10-02 16:17                       ` Jerin Jacob
2024-10-06 12:58                         ` Morten Brørup
2024-10-06 12:38 ` [PATCH v5] " Morten Brørup
2024-10-06 13:58 ` [PATCH v6] " Morten Brørup
2024-10-07  5:45   ` Jerin Jacob
2024-10-07  6:07     ` Morten Brørup
2024-10-06 14:03 ` [PATCH v7] " Morten Brørup
2024-10-06 14:09   ` Morten Brørup
2024-10-07 11:46 ` [PATCH v9] " Morten Brørup
2024-10-08  7:16   ` Morten Brørup
2024-10-08 10:15   ` David Marchand

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=CALBAE1NwtP6DEaJjNDr7Dx9FAjr7FtjJrF9nrz43E1L0io_zDQ@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=jerinj@marvell.com \
    --cc=mb@smartsharesystems.com \
    --cc=skori@marvell.com \
    --cc=techboard@dpdk.org \
    /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).