From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbbG3OGs (ORCPT ); Thu, 30 Jul 2015 10:06:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40522 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391AbbG3OGr (ORCPT ); Thu, 30 Jul 2015 10:06:47 -0400 Date: Thu, 30 Jul 2015 16:06:44 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, eranian@google.com, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 4/4] perf, tools, stat: Implement CSV metrics output Message-ID: <20150730140644.GR9606@krava.brq.redhat.com> References: <1438215700-5530-1-git-send-email-andi@firstfloor.org> <1438215700-5530-5-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438215700-5530-5-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 Wed, Jul 29, 2015 at 05:21:40PM -0700, Andi Kleen wrote: SNIP > + } > } > > static void print_aggr(char *prefix) > @@ -818,11 +883,7 @@ static void print_aggr(char *prefix) > continue; > } > uval = val * counter->scale; > - printout(id, nr, counter, uval, prefix); > - if (!csv_output) > - print_noise(counter, 1.0); > - > - print_running(run, ena); > + printout(id, nr, counter, uval, prefix, run, ena, 1.0); > fputc('\n', output); > } > } > @@ -848,12 +909,7 @@ static void print_aggr_thread(struct perf_evsel *counter, char *prefix) > fprintf(output, "%s", prefix); > > uval = val * counter->scale; > - printout(thread, 0, counter, uval, prefix); > - > - if (!csv_output) > - print_noise(counter, 1.0); > - > - print_running(run, ena); > + printout(thread, 0, counter, uval, prefix, run, ena, 1.0); > fputc('\n', output); > } > } > @@ -897,11 +953,7 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix) > } > > uval = avg * counter->scale; > - printout(-1, 0, counter, uval, prefix); > - > - print_noise(counter, avg); > - > - print_running(avg_running, avg_enabled); > + printout(-1, 0, counter, uval, prefix, avg_running, avg_enabled, avg); > fprintf(output, "\n"); > } > > @@ -949,11 +1001,7 @@ static void print_counter(struct perf_evsel *counter, char *prefix) > } > > uval = val * counter->scale; > - printout(cpu, 0, counter, uval, prefix); > - > - if (!csv_output) > - print_noise(counter, 1.0); > - print_running(run, ena); > + printout(cpu, 0, counter, uval, prefix, run, ena, 1.0); print_running still stayed in print_aggr how about moving the (run == 0 || ena == 0) leg from print_aggr into printout jirka