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


Groups > linux.kernel > #1203341

Re: [PATCH 2/7] perf, tools, stat: Abstract stat metrics printing

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/7] perf, tools, stat: Abstract stat metrics printing
Date 2015-08-08 19:50 +0200
Message-ID <pVgpP-5Kd-1@gated-at.bofh.it> (permalink)
References <pV0Eq-8gC-3@gated-at.bofh.it> <pV0Eq-8gC-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 07, 2015 at 05:51:54PM -0700, Andi Kleen wrote:

SNIP

> +
>  static void nsec_printout(int id, int nr, struct perf_evsel *evsel, double avg)
>  {
>  	FILE *output = stat_config.output;
> @@ -516,7 +557,6 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
>  	FILE *output = stat_config.output;
>  	double sc =  evsel->scale;
>  	const char *fmt;
> -	int cpu = cpu_map__id_to_cpu(id);
>  
>  	if (csv_output) {
>  		fmt = sc != 1.0 ?  "%.2f%s" : "%.0f%s";
> @@ -529,9 +569,6 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
>  
>  	aggr_printout(evsel, id, nr);
>  
> -	if (stat_config.aggr_mode == AGGR_GLOBAL)
> -		cpu = 0;
> -
>  	fprintf(output, fmt, avg, csv_sep);
>  
>  	if (evsel->unit)
> @@ -543,12 +580,30 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
>  
>  	if (evsel->cgrp)
>  		fprintf(output, "%s%s", csv_sep, evsel->cgrp->name);
> +}
>  
> -	if (csv_output || stat_config.interval)
> -		return;
> +static void printout(int id, int nr, struct perf_evsel *counter, double uval)
> +{
> +	struct outstate os = { .fh = output };

hum..

  CC       builtin-stat.o
builtin-stat.c: In function ‘printout’:
builtin-stat.c:587:31: error: ‘output’ undeclared (first use in this function)
  struct outstate os = { .fh = output };
                               ^

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 2/7] perf, tools, stat: Abstract stat metrics printing Andi Kleen <andi@firstfloor.org> - 2015-08-08 03:00 +0200
  Re: [PATCH 2/7] perf, tools, stat: Abstract stat metrics printing Jiri Olsa <jolsa@redhat.com> - 2015-08-08 19:50 +0200

csiph-web