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


Groups > linux.kernel > #1338849

Re: [PATCH 3/6] perf, tools, stat: Support metrics in --per-core/socket mode

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/6] perf, tools, stat: Support metrics in --per-core/socket mode
Date 2016-02-21 18:20 +0100
Message-ID <r4FPQ-O0-5@gated-at.bofh.it> (permalink)
References <r3j4Z-4A2-11@gated-at.bofh.it> <r3j51-4A2-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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


Thread

[PATCH 3/6] perf, tools, stat: Support metrics in --per-core/socket mode Andi Kleen <andi@firstfloor.org> - 2016-02-17 23:50 +0100
  Re: [PATCH 3/6] perf, tools, stat: Support metrics in  --per-core/socket mode Jiri Olsa <jolsa@redhat.com> - 2016-02-21 18:20 +0100
  Re: [PATCH 3/6] perf, tools, stat: Support metrics in  --per-core/socket mode Jiri Olsa <jolsa@redhat.com> - 2016-02-21 18:30 +0100
  Re: [PATCH 3/6] perf, tools, stat: Support metrics in  --per-core/socket mode Jiri Olsa <jolsa@redhat.com> - 2016-02-21 18:30 +0100
    Re: [PATCH 3/6] perf, tools, stat: Support metrics in  --per-core/socket mode Andi Kleen <andi@firstfloor.org> - 2016-02-22 18:00 +0100

csiph-web