Messages in this thread | | | Date | Wed, 10 Jun 2015 22:22:47 +0200 | From | Jiri Olsa <> | Subject | Re: [PATCH 08/25] perf stat: Introduce perf_counts__(alloc|free|reset) functions |
| |
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@git.kernel.org > > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > > --- > > 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
| |