From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbcEULTI (ORCPT ); Sat, 21 May 2016 07:19:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35449 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbcEULTF (ORCPT ); Sat, 21 May 2016 07:19:05 -0400 Date: Sat, 21 May 2016 13:19:02 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 2/2] perf stat: Add missing aggregation headers for --metric-only CSV Message-ID: <20160521111902.GB5761@krava> References: <1463773815-25984-1-git-send-email-andi@firstfloor.org> <1463773815-25984-2-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463773815-25984-2-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 21 May 2016 11:19:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 20, 2016 at 12:50:15PM -0700, Andi Kleen wrote: > From: Andi Kleen > > When in CSV mode --metric-only outputs an header, unlike the other > modes. Previously it did not properly print headers for the > aggregation columns, so the headers were actually shifted against > the real values. > > Fix this here by outputting the correct headers for CSV. > > Signed-off-by: Andi Kleen > --- > tools/perf/builtin-stat.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c > index 790eeea335cc..5d295da0e41c 100644 > --- a/tools/perf/builtin-stat.c > +++ b/tools/perf/builtin-stat.c > @@ -1311,6 +1311,14 @@ static int aggr_header_lens[] = { > [AGGR_GLOBAL] = 0, > }; > > +static const char *aggr_header_csv[] = { > + [AGGR_CORE] = "core,cpus,", > + [AGGR_SOCKET] = "socket,cpus", > + [AGGR_NONE] = "cpu,", > + [AGGR_THREAD] = "comm-pid,", > + [AGGR_GLOBAL] = "" > +}; please indent properly, otherwise Acked-by: Jiri Olsa thanks, jirka