Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-22 Thread Jiri Olsa
On Wed, Sep 10, 2014 at 11:08:46AM -0300, Arnaldo Carvalho de Melo wrote: SNIP > + if (entries == NULL) > + return -ENOMEM; > + > + fda->nr_alloc = nr_alloc; > + fda->entries = entries; > + return 0; > +} > + > +struct fdarray *fdarray__new(int nr_alloc, int nr_autogr

Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-12 Thread Borislav Petkov
On Fri, Sep 12, 2014 at 05:48:29PM -0300, Arnaldo Carvalho de Melo wrote: > I'm not that successfull at landgrabs recently, people at Fedora don't > want to use the 'trace' alias for 'perf trace', even it not being used > by anybody so far. WTF, it's just a name... > Ideas of how to name zfree()?

Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-12 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 12, 2014 at 06:54:07PM +0200, Borislav Petkov escreveu: > On Fri, Sep 12, 2014 at 11:22:25AM -0300, Arnaldo Carvalho de Melo wrote: > > Yeah, to me as well, but then zfree() was such a nice pick and looked ok > > at the time :-) > > > > I'm leaving this for later, different patchkit th

Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-12 Thread Borislav Petkov
On Fri, Sep 12, 2014 at 11:22:25AM -0300, Arnaldo Carvalho de Melo wrote: > Yeah, to me as well, but then zfree() was such a nice pick and looked ok > at the time :-) > > I'm leaving this for later, different patchkit that would sweep thru > tools/ and find this pattern, make it use freez() (or so

Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-12 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 12, 2014 at 04:16:32PM +0200, Jiri Olsa escreveu: > On Fri, Sep 12, 2014 at 10:44:29AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Fri, Sep 12, 2014 at 02:58:22PM +0200, Jiri Olsa escreveu: > > > On Wed, Sep 10, 2014 at 11:08:46AM -0300, Arnaldo Carvalho de Melo wrote: > > > > +

Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-12 Thread Jiri Olsa
On Fri, Sep 12, 2014 at 10:44:29AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Sep 12, 2014 at 02:58:22PM +0200, Jiri Olsa escreveu: > > On Wed, Sep 10, 2014 at 11:08:46AM -0300, Arnaldo Carvalho de Melo wrote: > > > SNIP > > > > +struct fdarray *fdarray__new(int nr_alloc, int nr_autogrow)

Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-12 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 12, 2014 at 02:58:22PM +0200, Jiri Olsa escreveu: > On Wed, Sep 10, 2014 at 11:08:46AM -0300, Arnaldo Carvalho de Melo wrote: > SNIP > > +struct fdarray *fdarray__new(int nr_alloc, int nr_autogrow) > > +{ > > + struct fdarray *fda = calloc(1, sizeof(*fda)); > > + if (fda != NUL

Re: [PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-12 Thread Jiri Olsa
On Wed, Sep 10, 2014 at 11:08:46AM -0300, Arnaldo Carvalho de Melo wrote: SNIP > + if (entries == NULL) > + return -ENOMEM; > + > + fda->nr_alloc = nr_alloc; > + fda->entries = entries; > + return 0; > +} > + > +struct fdarray *fdarray__new(int nr_alloc, int nr_autogr

[PATCH 11/14] tools lib api: Adopt fdarray class from perf's evlist

2014-09-10 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo The extensible file description array that grew in the perf_evlist class can be useful for other tools, as it is not something that only evlists need, so move it to tools/lib/api/fd to ease sharing it. v2: Don't use {} like in: libapi_dirs: $(QUIET_MKDIR)