Received: by 10.223.185.116 with SMTP id b49csp4171234wrg; Tue, 6 Mar 2018 10:59:17 -0800 (PST) X-Google-Smtp-Source: AG47ELtDu2V7g0SY670U4Z9vAZUR1GpTDyYKpkQsZ6SjjGs7cGPVxo6Y4dNvGOqImI/hT+pwRJZD X-Received: by 2002:a17:902:128c:: with SMTP id g12-v6mr17688692pla.85.1520362757700; Tue, 06 Mar 2018 10:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520362757; cv=none; d=google.com; s=arc-20160816; b=USrTG/bfTYaZjPhty4xNNM2IziaLclcwl9tX/5tM8epxb/fSk7Yt/kpsu/Zk45Hgnv /PC/caL4FPiC1GIVq/ETQmUU/WsTraNxJTMJajf+CiEEJs+PnXplVG/bJcBdu1gNsGP8 tW/6HVZitkxvhoCF2VB9gPc/UC3pNDDa+zJg/wBDtz6QQM0VmUtFoQn0fqH/x3sK1xd0 D/UhMkhlYQrcxeZ84aFM2k/TLgQv3RmxUDAs1Hx7FE4I81Ts4z02i6V2ErK4j/MRl9o7 0sYYOj07dCnO+vXBDXdYq8rlYP8a6UInNXP3VYuSgf/+7c8jU5qTCesxDxUu8Y8HXfUi Y5vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=uBn2rpk2zFa/sREY/xNuL9iByU+uVt1mbGQ26GZJckE=; b=O7lqYOm6pfeAUPPL6e960TTNVDM3HpTb1H84QcEC3RmFWpWKzUOHQfU6a7lbe37HCA u/NuFnTZ+P1tDT0Jf59c06inHoB2NK7FlvIBfZ8aPWEi7O5iQp0ED3P+lJI7lc8VaX6f h3jYlBQqLHgjZZYy3Vf4Ujk+jP9+8Z0WqVVcPaPYVuuHwXH78mWy4Pq58JeprJaPk3+5 LS6UWviL5jOaLGIAbBKrPhibdJbv6ad60uZOT5YHX7HQAzFBNHBPvuFfmCMruOyQINU3 Ft+RhKD+NqbEkfPSynZVhu35MvKVfZGgk229cSb5r9R1pCigy0gTgoCyUKF5+o6vlSoc juLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39-v6si11556254plg.151.2018.03.06.10.59.02; Tue, 06 Mar 2018 10:59:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754002AbeCFS5g (ORCPT + 99 others); Tue, 6 Mar 2018 13:57:36 -0500 Received: from mga09.intel.com ([134.134.136.24]:35778 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753308AbeCFS5f (ORCPT ); Tue, 6 Mar 2018 13:57:35 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2018 10:57:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,432,1515484800"; d="scan'208";a="35972688" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.133]) by fmsmga001.fm.intel.com with ESMTP; 06 Mar 2018 10:57:34 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 732A230053E; Tue, 6 Mar 2018 10:57:19 -0800 (PST) Date: Tue, 6 Mar 2018 10:57:19 -0800 From: Andi Kleen To: Arnaldo Carvalho de Melo Cc: Cong Wang , linux-kernel@vger.kernel.org, Jiri Olsa , Ilya Pronin Subject: Re: [PATCH] perf stat: fix cvs output format Message-ID: <20180306185719.GF25017@tassilo.jf.intel.com> References: <20180306064353.31930-1-xiyou.wangcong@gmail.com> <20180306170011.GD25017@tassilo.jf.intel.com> <20180306173006.GB2213@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180306173006.GB2213@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > My understanding was that at some place there is a if/else > > if (supported counters) > fprintf_something with N fields, all filled in > else > fprintf_empty_fields with != N fields > > So I think this is not about using things like 'a,b,,,,,,' but about > using different number of commas (fields) for supported/unsupported > counters, no? I believe it's only about empty fields at the end. I don't think we ever get the columns wrong. The original patch just moved the problem because there are still cases where we can output different number of columns. If a tool looks only at the first row to allocate the number of columns it might error out if there are lines with more columns later. All outputs have to be padded to the maximum number of columns, so removing columns is never the right fix. -Andi