From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbcBVQ0m (ORCPT ); Mon, 22 Feb 2016 11:26:42 -0500 Received: from one.firstfloor.org ([193.170.194.197]:58575 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbcBVQ0l (ORCPT ); Mon, 22 Feb 2016 11:26:41 -0500 Date: Mon, 22 Feb 2016 17:26:37 +0100 From: Andi Kleen To: Jiri Olsa Cc: Andi Kleen , Arnaldo Carvalho de Melo , jolsa@kernel.org, linux-kernel@vger.kernel.org, eranian@google.com, Andi Kleen Subject: Re: [PATCH 2/6] perf, tools, stat: Implement CSV metrics output Message-ID: <20160222162637.GH5083@two.firstfloor.org> References: <1455749045-18098-1-git-send-email-andi@firstfloor.org> <1455749045-18098-3-git-send-email-andi@firstfloor.org> <20160218170035.GF9909@kernel.org> <20160218173921.GE5083@two.firstfloor.org> <20160221163940.GA10701@krava.homerouter.cpe> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160221163940.GA10701@krava.homerouter.cpe> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 21, 2016 at 05:39:40PM +0100, Jiri Olsa wrote: > On Thu, Feb 18, 2016 at 06:39:21PM +0100, Andi Kleen wrote: > > > Where before it wasn't there: > > > > > > cat /tmp/before > > > 0.282628,,task-clock,282628,100.00 > > > 1,,context-switches,282628,100.00 > > > 0,,cpu-migrations,282628,100.00 > > > 52,,page-faults,282628,100.00 > > > 861213,,cycles,285354,100.00 > > > ,,stalled-cycles-frontend,0,100.00 > > > ,,stalled-cycles-backend,0,100.00 > > > 686082,,instructions,285354,100.00 > > > 137846,,branches,285354,100.00 > > > 7142,,branch-misses,285354,100.00 > > > > This is intentional. See the standard perf output: > > > > > > 521,232 instructions # 0.63 insns per cycle > > # 1.13 stalled cycles per insn > > > > So this line has multiple metrics. In CSV this is expressed as a mostly empty line. > > it's intentional if you have data from stalled cycles counter > on cpu where this one is non supported you get blank line: I fixed this now by probing for the stalled cycles counters in advance. That avoids a couple of other issues too, like the empty columns in --metric-only, and even makes the output of standard perf stat shorter. -Andi