Messages in this thread | | | Date | Tue, 25 Sep 2012 08:28:18 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH 28/30] perf evsel: Provide a new constructor for tracepoints |
| |
Em Tue, Sep 25, 2012 at 01:26:46PM +0900, Namhyung Kim escreveu: > On Mon, 24 Sep 2012 12:59:42 -0300, Arnaldo Carvalho de Melo wrote: > > + if (size == alloc_size) { > > + alloc_size += BUFSIZ; > > + nbf = realloc(bf, alloc_size); > > + if (nbf == NULL) > > + goto out_free_bf; > > + bf = nbf; > > + } > > + > > + n = read(fd, bf + size, BUFSIZ); > > Wouldn't it be better doing s/BUFSIZ/alloc_size - size/ ? Although > there'll be no partial reading issue when working on debugfs I guess.
Yeah, don't know if that is worth it :-\
- Arnaldo
| |