From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753942AbeCFRxh (ORCPT ); Tue, 6 Mar 2018 12:53:37 -0500 Received: from mga11.intel.com ([192.55.52.93]:16110 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750838AbeCFRxg (ORCPT ); Tue, 6 Mar 2018 12:53:36 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,432,1515484800"; d="scan'208";a="32864010" Date: Tue, 6 Mar 2018 09:53:20 -0800 From: Andi Kleen To: Cong Wang Cc: LKML , Arnaldo Carvalho de Melo , Jiri Olsa , Ilya Pronin Subject: Re: [PATCH] perf stat: fix cvs output format Message-ID: <20180306175320.GE25017@tassilo.jf.intel.com> References: <20180306064353.31930-1-xiyou.wangcong@gmail.com> <20180306170011.GD25017@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Here is the output from your own commit: > > 423470,,stalled-cycles-frontend,509102,100.00,65.69,frontend cycles idle > ,,stalled-cycles-backend,0,100.00,,,, > > so line 1 has 7 fields, line 2 has 9 fields, and this is expected? If you had metrics on line 1 it would be correct. So you just shifted it to break that case. If you always want to have the same number of fields you need to add two empty fields to the normal output when there are no metrics. -Andi