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


Groups > linux.kernel > #1428812

Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist
Date 2016-06-22 15:50 +0200
Message-ID <rMQHw-47X-33@gated-at.bofh.it> (permalink)
References <rMMkx-1su-11@gated-at.bofh.it> <rMMue-1vP-29@gated-at.bofh.it> <rMQet-3Xx-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Wed, Jun 22, 2016 at 08:17:02AM -0500, Nilay Vaish escreveu:
> On 22 June 2016 at 04:08, Wang Nan <wangnan0@huawei.com> wrote:
> > +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent)
> > +{
> > +       struct perf_evlist *evlist;
> > +
> > +       if (perf_evlist__is_aux(parent)) {
> > +               pr_err("Internal error: create aux evlist from another aux evlist\n");
> > +               return NULL;
> > +       }
> > +
> > +       evlist = zalloc(sizeof(*evlist));
> > +       if (!evlist)
> > +               return NULL;
> > +
> > +       perf_evlist__init(evlist, parent->cpus, parent->threads);
> > +       evlist->parent = parent->parent;
> 
> A very minor suggestion.  I think evlist->parent  should be set to
> 'parent' and not 'parent->parent'.  I agree the two values are equal,
> but setting to parent->parent just does not seem right.

I felt like that, thought I was missing something, which is always a bad
feeling when processing a patch... So, Wang, does that have some value
we are not seeing?

I thought about the possibility of adding an aux2 to an aux1 evlist and
that making aux2 have the same parent as aux1, but that is checked on
that pr_err() test...

- Arnaldo

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


Thread

[PATCH v9 0/8] perf tools: Support overwritable ring buffer Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:10 +0200
  [PATCH v9 7/8] perf tools: Don't warn about out of order event if write_backward is used Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:10 +0200
  [PATCH v9 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:20 +0200
  [PATCH v9 2/8] perf tests: Add testcase for auxiliary evlist Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:20 +0200
  [PATCH v9 5/8] perf record: Toggle overwrite ring buffer for reading Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:20 +0200
    Re: [PATCH v9 5/8] perf record: Toggle overwrite ring buffer for reading Nilay Vaish <nilayvaish@gmail.com> - 2016-06-22 16:40 +0200
      Re: [PATCH v9 5/8] perf record: Toggle overwrite ring buffer for  reading "Wangnan (F)" <wangnan0@huawei.com> - 2016-06-23 03:30 +0200
  [PATCH v9 3/8] perf record: Extract perf_evlist__mmap_ex() processing to a new function Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:20 +0200
  [PATCH v9 6/8] perf tools: Enable overwrite settings Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:20 +0200
  [PATCH v9 8/8] perf tools: Add --tail-synthesize option Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:20 +0200
  [PATCH v9 1/8] perf evlist: Introduce aux evlist Wang Nan <wangnan0@huawei.com> - 2016-06-22 11:20 +0200
    Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist Nilay Vaish <nilayvaish@gmail.com> - 2016-06-22 15:20 +0200
      Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-22 15:50 +0200
        Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist "Wangnan (F)" <wangnan0@huawei.com> - 2016-06-23 03:40 +0200
    [PATCH v9.1] perf evlist: Introduce aux evlist Wang Nan <wangnan0@huawei.com> - 2016-06-23 04:20 +0200

csiph-web