[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160221171845.GD10701@krava.homerouter.cpe>
Date: Sun, 21 Feb 2016 18:18:45 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: acme@...nel.org, jolsa@...nel.org, linux-kernel@...r.kernel.org,
eranian@...gle.com, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 3/6] perf, tools, stat: Support metrics in
--per-core/socket mode
On Wed, Feb 17, 2016 at 02:44:02PM -0800, Andi Kleen wrote:
SNIP
>
> perf_stat__print_shadow_stats(counter, uval,
> stat_config.aggr_mode == AGGR_GLOBAL ? 0 :
> - cpu_map__id_to_cpu(id),
> + first_shadow_cpu(counter, id),
> &out);
> -
> if (!csv_output) {
> print_noise(counter, noise);
> print_running(run, ena);
> }
> }
>
> +static void aggr_update_shadow(void)
> +{
> + int cpu, cpu2, s2, id, s;
> + u64 val;
> + struct perf_evsel *counter;
> +
> + for (s = 0; s < aggr_map->nr; s++) {
> + id = aggr_map->map[s];
> + evlist__for_each(evsel_list, counter) {
> + val = 0;
> + for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
> + cpu2 = perf_evsel__cpus(counter)->map[cpu];
> + s2 = aggr_get_id(evsel_list->cpus, cpu2);
I think you need to pass cpu's 'idx' into aggr_get_id,
because it will do evsel_list->cpus[cpu2] for you
jirka
Powered by blists - more mailing lists