[EXT] [PATCH v2 5/9] trace: fix dynamically enabling trace points

Sunil Kumar Kori skori at marvell.com
Wed Oct 12 12:15:06 CEST 2022


> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Wednesday, October 12, 2022 3:27 PM
> To: Sunil Kumar Kori <skori at marvell.com>
> Cc: dev at dpdk.org; skori at mavell.com; Jerin Jacob Kollanukkaran
> <jerinj at marvell.com>; stable at dpdk.org
> Subject: Re: [EXT] [PATCH v2 5/9] trace: fix dynamically enabling trace points
> 
> On Wed, Oct 12, 2022 at 11:24 AM Sunil Kumar Kori <skori at marvell.com>
> wrote:
> > > diff --git a/lib/eal/common/eal_common_trace_utils.c
> > > b/lib/eal/common/eal_common_trace_utils.c
> > > index 2b55dbec65..7bf1c05e12 100644
> > > --- a/lib/eal/common/eal_common_trace_utils.c
> > > +++ b/lib/eal/common/eal_common_trace_utils.c
> > > @@ -314,14 +314,18 @@ trace_dir_default_path_get(char *dir_path)
> > >       return 0;
> > >  }
> > >
> > > -int
> > > +static int
> > >  trace_mkdir(void)
> > >  {
> > >       struct trace *trace = trace_obj_get();
> > >       char session[TRACE_DIR_STR_LEN];
> > > +     static bool already_done;
> > >       char *dir_path;
> > >       int rc;
> > >
> > > +     if (already_done)
> > > +             return 0;
> > > +
> >
> > As trace_mkdir() call is being moved to rte_trace_save() so there won't be
> another context which will be invoking trace_mkdir().
> > So is this logic still needed here ?
> 
> I have in mind a case where an application calls rte_trace_save() multiple
> times.

Make sense. 
Acked-by: Sunil Kumar Kori <skori at marvell.com>

> 
> 
> --
> David Marchand



More information about the stable mailing list