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


Groups > linux.kernel > #1404027

Re: [PATCH 10/10] perf, tools, stat: Add extra output of counter values with -vv

From Andi Kleen <andi@firstfloor.org>
Newsgroups linux.kernel
Subject Re: [PATCH 10/10] perf, tools, stat: Add extra output of counter values with -vv
Date 2016-05-20 02:10 +0200
Message-ID <rAGaR-6Mf-1@gated-at.bofh.it> (permalink)
References <rvAz7-1bh-5@gated-at.bofh.it> <rvAz7-1bh-9@gated-at.bofh.it> <rxTQZ-1yW-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> hi,
> we already have similar output for aggregated counters,
> could you please consider something like below to clearly
> separate them?

I think Arnaldo has already merged the patch, so he should merge
the fix too. The fix is fine for me.

-Andi

> 
> [root@ibm-x3650m4-01 perf]# ./perf stat  -e cycles -I 1000 -vv -a -C 0,1
> ...
> cycles: CPU 0: 1298783264 1000126956 1000126956
> cycles: CPU 1: 1298791660 1000134589 1000134589
> cycles: AGGR: 2597574924 2000261545 2000261545
> ...
> 
> thanks,
> jirka
> 
> 
> ---
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 7c5c50b61b28..bd0d67ebb757 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -316,7 +316,7 @@ static int read_counter(struct perf_evsel *counter)
>  
>  			if (verbose > 1) {
>  				fprintf(stat_config.output,
> -					"%s: %d: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
> +					"%s: CPU %d: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
>  						perf_evsel__name(counter),
>  						cpu,
>  						count->val, count->ena, count->run);
> diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
> index c1ba255f2abe..5ddeea1399ee 100644
> --- a/tools/perf/util/stat.c
> +++ b/tools/perf/util/stat.c
> @@ -345,7 +345,7 @@ int perf_stat_process_counter(struct perf_stat_config *config,
>  		update_stats(&ps->res_stats[i], count[i]);
>  
>  	if (verbose) {
> -		fprintf(config->output, "%s: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
> +		fprintf(config->output, "%s: AGGR: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
>  			perf_evsel__name(counter), count[0], count[1], count[2]);
>  	}
>  
> 

-- 
ak@linux.intel.com -- Speaking for myself only.

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


Thread

Re: [PATCH 10/10] perf, tools, stat: Add extra output of counter  values with -vv Andi Kleen <andi@firstfloor.org> - 2016-05-20 02:10 +0200

csiph-web