lkml.org 
[lkml]   [2023]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v1 1/6] perf annotate: Delete session for debug builds
    Em Wed, Mar 29, 2023 at 10:09:48AM -0300, Arnaldo Carvalho de Melo escreveu:
    > Em Tue, Mar 28, 2023 at 04:55:38PM -0700, Ian Rogers escreveu:
    > > Use the debug build indicator as the guide to free the session. This
    > > implements a behavior described in a comment, which is consequentially
    > > removed.
    > >
    > > Signed-off-by: Ian Rogers <irogers@google.com>
    > > ---
    > > tools/perf/builtin-annotate.c | 16 ++++++----------
    > > 1 file changed, 6 insertions(+), 10 deletions(-)
    > >
    > > diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
    > > index 4750fac7bf93..98d1b6379230 100644
    > > --- a/tools/perf/builtin-annotate.c
    > > +++ b/tools/perf/builtin-annotate.c
    > > @@ -692,16 +692,12 @@ int cmd_annotate(int argc, const char **argv)
    > >
    > > out_delete:
    > > /*
    > > - * Speed up the exit process, for large files this can
    > > - * take quite a while.
    > > - *
    > > - * XXX Enable this when using valgrind or if we ever
    > > - * librarize this command.
    > > - *
    > > - * Also experiment with obstacks to see how much speed
    > > - * up we'll get here.
    > > - *
    > > - * perf_session__delete(session);
    > > + * Speed up the exit process by only deleting for debug builds. For
    > > + * large files this can save time.
    > > */
    > > +#ifndef NDEBUG
    > > + perf_session__delete(annotate.session);
    > > +#endif
    >
    > So now, but default, we will call this, as we don't have this defined
    > only if DEBUG=1 is set, right?
    >
    > ⬢[acme@toolbox perf-tools-next]$ find tools/perf/ -type f | xargs grep NDEBUG
    > tools/perf/util/mutex.c:#ifndef NDEBUG
    > ⬢[acme@toolbox perf-tools-next]$

    We can discuss this later, applied the series with just that zfree()
    change to annotation_options__exit().

    - Arnaldo

    \
     
     \ /
      Last update: 2023-03-29 15:19    [W:2.974 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site