From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992632AbbHHRkb (ORCPT ); Sat, 8 Aug 2015 13:40:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54802 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992474AbbHHRk3 (ORCPT ); Sat, 8 Aug 2015 13:40:29 -0400 Date: Sat, 8 Aug 2015 19:40:26 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, eranian@google.com, namhyung@kernel.org, Andi Kleen Subject: Re: [PATCH 2/7] perf, tools, stat: Abstract stat metrics printing Message-ID: <20150808174026.GE17040@krava.brq.redhat.com> References: <1438995119-10531-1-git-send-email-andi@firstfloor.org> <1438995119-10531-3-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1438995119-10531-3-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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