[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120925112818.GE28902@infradead.org>
Date: Tue, 25 Sep 2012 08:28:18 -0300
From: Arnaldo Carvalho de Melo <acme@...radead.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <peterz@...radead.org>,
Stephane Eranian <eranian@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists