Re: [PATCH 08/25] perf stat: Introduce perf_counts__(alloc|free|reset) functions

From: Jiri Olsa
Date: Wed Jun 10 2015 - 16:23:05 EST


On Wed, Jun 10, 2015 at 03:54:27PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jun 10, 2015 at 08:10:41PM +0200, Jiri Olsa escreveu:
> > Move 'struct perf_counts' allocation|free|reset code into
> > separate functions.
> >
> > Link: http://lkml.kernel.org/n/tip-qu64zmm5zbpbkuybusnkg4gl@xxxxxxxxxxxxxx
> > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> > ---
> > tools/perf/builtin-stat.c | 19 +++++++------------
> > tools/perf/util/evsel.c | 28 +++++++++++++++++++++++-----
> > tools/perf/util/evsel.h | 3 +++
> > 3 files changed, 33 insertions(+), 17 deletions(-)
>
> But please do not move it to 'evsel.[ch]', i.e. you're introducing a new
> class, i.e. "perf_counts", you might as well put them in a separate
> file, i.e. tools/perf/util/counts.[ch].
>
> And please rename perf_counts__alloc() to perf_counds__new(), ditto for
> __free() -> __delete(),

ok

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/