lkml.org 
[lkml]   [2017]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/10] perf, tools, stat: Factor out callback for collecting event values
On Tue, Feb 28, 2017 at 10:49:15PM -0800, Andi Kleen wrote:

SNIP

> +static void collect_data(struct perf_evsel *counter,
> + void (*cb)(struct perf_evsel *counter, void *data,
> + bool first),
> + void *data)
> +{
> + cb(counter, data, true);
> +}
> +
> +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, cpu2, s2;
> +
> + for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
> + struct perf_counts_values *counts;
> +
> + cpu2 = perf_evsel__cpus(counter)->map[cpu];
> + s2 = aggr_get_id(evsel_list->cpus, cpu2);

that does not match the removed code.. why?
s2 = aggr_get_id(perf_evsel__cpus(counter), cpu);

jirka

\
 
 \ /
  Last update: 2017-03-03 11:43    [W:0.109 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site