Re: [GIT PULL||RFC 00/11] perf library and regression testing improvements

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnaldo Carvalho de Melo
Date: Tuesday, January 4, 2011 - 7:12 am

Em Tue, Jan 04, 2011 at 02:59:00PM +0100, Stephane Eranian escreveu:

Well, it shoudldn't, as we do, before calling that function:

        list_for_each_entry(pos, &evsel_list, node) {
                if (perf_evsel__alloc_stat_priv(pos) < 0 ||
                    perf_evsel__alloc_counts(pos, cpus->nr) < 0 ||
                    perf_evsel__alloc_fd(pos, cpus->nr, threads->nr) < 0)
                        goto out_free_fd;
        }

And then at line 206 it does:

	update_stats(&ps->res_stats[i], count[i]);

ps was set to be:

	struct perf_stat *ps = counter->priv;

that was set by perf_evsel__alloc_stat_priv

and count is

u64 *count = counter->counts->aggr.values;

That was allocated by perf_evsel__alloc_counts

/me scratches head :-\

- Arnaldo
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL||RFC 00/11] perf library and regression testing ..., Arnaldo Carvalho de Melo, (Mon Jan 3, 8:48 pm)
[PATCH 01/11] perf tools: Introduce event selectors, Arnaldo Carvalho de Melo, (Mon Jan 3, 8:48 pm)
[PATCH 06/11] perf evsel: Introduce per cpu and per thread ..., Arnaldo Carvalho de Melo, (Mon Jan 3, 8:48 pm)
[PATCH 07/11] perf tools: Refactor cpumap to hold nr and t ..., Arnaldo Carvalho de Melo, (Mon Jan 3, 8:48 pm)
[PATCH 08/11] perf tools: Refactor all_tids to hold nr and ..., Arnaldo Carvalho de Melo, (Mon Jan 3, 8:48 pm)
[PATCH 09/11] perf evsel: Use {cpu,thread}_map to shorten ..., Arnaldo Carvalho de Melo, (Mon Jan 3, 8:48 pm)
[PATCH 10/11] perf evsel: Auto allocate resources needed f ..., Arnaldo Carvalho de Melo, (Mon Jan 3, 8:48 pm)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 7:03 am)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 7:12 am)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 7:19 am)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 7:27 am)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 7:34 am)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 7:36 am)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 8:24 am)
Re: [GIT PULL||RFC 00/11] perf library and regression test ..., Arnaldo Carvalho de Melo, (Tue Jan 4, 8:30 am)