Re: [PATCH 13/25] perf stat: Move perf_evsel__(alloc|free|reset)_stat_priv into evsel object

Jiri Olsa
2015-06-10T20:22:11Z

On Wed, Jun 10, 2015 at 03:49:25PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jun 10, 2015 at 08:10:46PM +0200, Jiri Olsa escreveu:
> > Moving perf_evsel__(alloc|free|reset)_stat_priv into evsel object,
> > so it could be used outside stat object in following patches.
>
> > +++ b/tools/perf/util/evsel.c
>
> > +void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
> > +{
> > + int i;
> > + struct perf_stat *ps = evsel->priv;
> > +
> > + for (i = 0; i < 3; i++)
> > + init_stats(&ps->res_stats[i]);
> > +
> > + perf_stat_evsel_id_init(evsel);
> > +}
>
> Please move this to some 'stat' specific place, so that evsel.c has
> nothing that is tool specific, like references to 'struct perf_stat'.

ok, util/stat.c then

jirka