Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411279

Re: [PATCH 1/4] perf stat: Basic support for TopDown in perf stat

From Andi Kleen <ak@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] perf stat: Basic support for TopDown in perf stat
Date 2016-06-01 16:40 +0200
Message-ID <rFftn-17P-9@gated-at.bofh.it> (permalink)
References <rCqEG-7B3-11@gated-at.bofh.it> <rFfjH-14J-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jun 01, 2016 at 09:24:33AM -0500, Nilay Vaish wrote:
> On 24 May 2016 at 14:52, Andi Kleen <andi@firstfloor.org> wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> >
> > diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> > index 715a1128daeb..dab184d86816 100644
> > --- a/tools/perf/builtin-stat.c
> > +++ b/tools/perf/builtin-stat.c
> > @@ -59,10 +59,13 @@
> >  #include "util/thread.h"
> >  #include "util/thread_map.h"
> >  #include "util/counts.h"
> > +#include "util/group.h"
> >  #include "util/session.h"
> >  #include "util/tool.h"
> > +#include "util/group.h"
> >  #include "asm/bug.h"
> 
> You have included util/group.h twice.  Is this intentional?

No was a mistake thanks.

> Continuing with my comment from above memory leak, if i == off,
> topdown_attrs[0] will be NULL.  So we would enter the else portion
> here and return -1.  But we never free the string we allocated in the
> function topdown_filter_events().   I think we are leaking some memory
> though seems only about 3 bytes.

Right, however the process immediately exits afterwards, so it gets
cleaned up anyways.

-Andi


-- 
ak@linux.intel.com -- Speaking for myself only

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/4] perf stat: Basic support for TopDown in perf stat Nilay Vaish <nilayvaish@gmail.com> - 2016-06-01 16:30 +0200
  Re: [PATCH 1/4] perf stat: Basic support for TopDown in perf stat Andi Kleen <ak@linux.intel.com> - 2016-06-01 16:40 +0200
  Re: [PATCH 1/4] perf stat: Basic support for TopDown in perf stat Andi Kleen <ak@linux.intel.com> - 2016-06-01 17:30 +0200
    Re: [PATCH 1/4] perf stat: Basic support for TopDown in perf stat Nilay Vaish <nilayvaish@gmail.com> - 2016-06-02 14:00 +0200

csiph-web