[EXT] [PATCH v2 5/9] trace: fix dynamically enabling trace points
David Marchand
david.marchand at redhat.com
Wed Oct 12 11:57:12 CEST 2022
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.
--
David Marchand
More information about the stable
mailing list