[EXTERNAL] [PATCH v3 2/6] trace: support dereferencing arguments
Sunil Kumar Kori
skori at marvell.com
Wed Feb 12 06:08:10 CET 2025
> On Tue, Feb 11, 2025 at 9:44 AM Sunil Kumar Kori <skori at marvell.com>
> wrote:
> >
> > > diff --git a/lib/eal/common/eal_common_trace_ctf.c
> > > b/lib/eal/common/eal_common_trace_ctf.c
> > > index 04c4f71462..3e4228ee7f 100644
> > > --- a/lib/eal/common/eal_common_trace_ctf.c
> > > +++ b/lib/eal/common/eal_common_trace_ctf.c
> > > @@ -373,6 +373,11 @@ rte_trace_metadata_dump(FILE *f)
> > >
> > > char *trace_metadata_fixup_field(const char *field) {
> > > + static const char * const tokens[] = {
> > > + ".",
> > > + "->",
> > > + "*",
> > > + };
> > As this patch is intended to support dereferencing operation but as a side
> effect it applies to multiplication operator too.
>
> Support for multiplication helps with the next patch too, when passing an
> array size as a blob length.
>
> > Hence for A * B, field is generated like A___B (one extra underscore). So
> IMO, multiplication string shouldn't be used.
>
> I am not following the consequence.. why should it be prevented?
As such there is no consequence on functionality. It's just about readability.
For example, num_entries * size will result in num_entries___size which actually
not representing that this is used to size. Instead tot_size = num_entries * size and
then using tot_size clearly specifies that it is the total size of array.
>
>
> --
> David Marchand
More information about the dev
mailing list