Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp666513imu; Tue, 27 Nov 2018 04:40:08 -0800 (PST) X-Google-Smtp-Source: AJdET5eYdUTup0QDsRAcYX8ZUzXsiEjml2S+aVD5E/3OAU2j1GqKyuuaPHdwfhVMVOB8ac+iMtjU X-Received: by 2002:a62:c21c:: with SMTP id l28mr32354853pfg.74.1543322408879; Tue, 27 Nov 2018 04:40:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543322408; cv=none; d=google.com; s=arc-20160816; b=vyT7lPfHpOw/hhEtkHVc3Yx0JY+jTfQkuZ/FUtlhzke3lfZBq1KhatwIAyWfNDimeG 5bxj8zRTxmM3RnyTmprxWmZCcV/Rp9CoxjDTOgPwtNNLIXmWFOxp2gpzJM+nJWrIiCCG l34HfJ0eINoHz/gsQmKHOUyUHGbZxG3pY2nGAyd6CzytWIFmdsyf62d9vxLPsTI+Yqne pz4C9NaCP/RzZTvYBfpWUhv6cmnz56w/pu3aapzGMSffO6JkuoRLwJtEVNI1I3YxhPXV nSy2qcCaKtDaDCVoq8UsgunsYoFNb1TCbYut8QwSREb/JAs+eIr64HMsySMjbIg2vK4G 3d5g== 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:dkim-signature; bh=awg6BmT9q7A75xevsZv/DpCVD1CffMCRPdItUubcRfI=; b=0iFZnZcmfV9CmlEaFD0/R1w7QXUel1OQe/jBKtTB7I3CiAgdOalZAfbTvS6U6auEGC vZwPmKdFpx1NQQReXU1jaQQbSkq7AzDii8l00L9sihvzCcrZhQl5t80kPAXfpqCYVey0 N4frrUO/kcNbXiAXNM51FvOlEDDiCt8ZW1HWQN+2Fn726DGc/NNM02/bHV4TUyEmoJWQ utUn6JTtj0Sd1F42RyHIkaAOTavw6eHzBw92uNs+eXci6DWqAt7C8t7zF165et7Fr06/ 80PzQC0x+tTdUoCzSgWCdbcR8aiOT8ytRmkXvERAMTk9ha2T0Ah4s6z1Cm4AN0Z+ymgu ufuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yIoCcBuB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18si3761704pgj.77.2018.11.27.04.39.51; Tue, 27 Nov 2018 04:40:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=yIoCcBuB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729260AbeK0Xdo (ORCPT + 99 others); Tue, 27 Nov 2018 18:33:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:33984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726407AbeK0Xdn (ORCPT ); Tue, 27 Nov 2018 18:33:43 -0500 Received: from quaco.infradead.org (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A73D5208E4; Tue, 27 Nov 2018 12:35:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543322155; bh=5wfzqkuEgNVo5BjfJWGam44RxPiqvfW5xmVSFOFUrZc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yIoCcBuB/czwz0G1UvuIVKDlur0ewk1MRSSLRkMBxSwuIVxNrYCeCULhYcta2xIgs 2Ux2LSGOyinz+u/8A4o69z7nTAt5uEPvCYE1BDmGjN9VjdVrPDxpaSaQi73J32ZIoI RSJOfAKfZvXRqcQ4NxM1Eu84S4CzM2FsUKCgD/Ho= Received: by quaco.infradead.org (Postfix, from userid 1000) id 4778141117; Mon, 26 Nov 2018 15:49:16 -0300 (-03) Date: Mon, 26 Nov 2018 15:49:16 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Stephane Eranian , linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@elte.hu Subject: Re: [PATCH] perf stat: fix csv mode column output for non-cgroup events Message-ID: <20181126184916.GD5518@kernel.org> References: <1541587845-9150-1-git-send-email-eranian@google.com> <20181122035811.GD5468@redhat.com> <20181122090835.GB15953@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181122090835.GB15953@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Nov 22, 2018 at 10:08:35AM +0100, Jiri Olsa escreveu: > On Thu, Nov 22, 2018 at 01:58:11AM -0200, Arnaldo Carvalho de Melo wrote: > > Em Wed, Nov 07, 2018 at 02:50:45AM -0800, Stephane Eranian escreveu: > > > When using the -x option, perf stat prints csv-style output > > > with one event per line. For each event, it prints the count, > > > the unit, the event name, the cgroup, and a bunch of other event > > > specific fields (such as insn per cycles). > > > > > > When you use csv-style mode, you expect a normalized output where > > > each event is printed with the same number of fields regardless of > > > what it is so it can easily be imported into a spreadsheet or parsed. > > > For instance, if an event does not have a unit, then print an empty field > > > for it. Although this approach was implemented for the unit, it was not > > > for the cgroup. When mixing cgroup and non-cgroup events, then non-cgroup > > > events would not show an empty field, instead the next field was printed, > > > make columns not line up correctly. > > > > > > This patch fixes the cgroup output issues by forcing an empty field > > > for non-cgroup events as soon as one event has cgroup. > > > > Looks sane, that nr_cgroups global variable at some point has to go to > > the evlist, but that is not introduced by this patch, Jiri, are you ok > > with it as well? > > yep, looks good, sry I missed it > > Acked-by: Jiri Olsa Thanks, applied. - Arnaldo