Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600557

Re: [PATCH 01/13] perf, tools, stat: Factor out callback for collecting event values

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 01/13] perf, tools, stat: Factor out callback for collecting event values
Date 2017-03-14 16:10 +0100
Message-ID <tkWfh-1T2-43@gated-at.bofh.it> (permalink)
References <tjAgN-1eI-1@gated-at.bofh.it> <tjAgO-1eI-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Mar 10, 2017 at 01:24:34PM -0800, Andi Kleen wrote:

SNIP

> +
> +struct aggr_data {
> +	u64 ena, run, val;
> +	int id;
> +	int nr;
> +	int cpu;
> +};
> +
> +static void aggr_cb(struct perf_evsel *counter, void *data, bool first)
> +{
> +	struct aggr_data *ad = data;
> +	int cpu, s2;
> +
> +	for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
> +		struct perf_counts_values *counts;
> +
> +		s2 = aggr_get_id(evsel_list->cpus, cpu);

why do use evsel_list instead of perf_evsel__cpus(counter),
which is in the original/removed code?

this patch is about adding collect_data.. if you want to
choose this part, please make it clear in separate patch

thanks,
jirka

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 01/13] perf, tools, stat: Factor out callback for  collecting event values Jiri Olsa <jolsa@redhat.com> - 2017-03-14 16:10 +0100

csiph-web