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

2014-09-03 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. Cc: Adrian Hunter Cc: Borislav Petkov Cc: Corey Ashford Cc:

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

2014-08-26 Thread Arnaldo Carvalho de Melo
Em Tue, Aug 26, 2014 at 04:46:18PM +0900, Namhyung Kim escreveu: > Hi Arnaldo, > > On Fri, 22 Aug 2014 17:59:50 -0300, Arnaldo Carvalho de Melo wrote: > > +int fdarray__add(struct fdarray *fda, int fd) > > +{ > > + /* > > +* XXX: 64 is arbitrary, just not to call realloc at each fd. > > +

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

2014-08-26 Thread Namhyung Kim
Hi Arnaldo, On Fri, 22 Aug 2014 17:59:50 -0300, Arnaldo Carvalho de Melo wrote: > +int fdarray__add(struct fdarray *fda, int fd) > +{ > + /* > + * XXX: 64 is arbitrary, just not to call realloc at each fd. > + * Find a better autogrowing heuristic > + */ > + if (fda->nr

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

2014-08-22 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. Cc: Adrian Hunter Cc: Borislav Petkov Cc: Corey Ashford Cc: