All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Stephane Eranian <eranian@google.com>,
	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
Date: Mon, 26 Nov 2018 15:49:16 -0300	[thread overview]
Message-ID: <20181126184916.GD5518@kernel.org> (raw)
In-Reply-To: <20181122090835.GB15953@krava>

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 <jolsa@kernel.org>

Thanks, applied.

- Arnaldo

  reply	other threads:[~2018-11-27 12:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 10:50 [PATCH] perf stat: fix csv mode column output for non-cgroup events Stephane Eranian
2018-11-21 22:33 ` Stephane Eranian
2018-11-22  3:58 ` Arnaldo Carvalho de Melo
2018-11-22  9:08   ` Jiri Olsa
2018-11-26 18:49     ` Arnaldo Carvalho de Melo [this message]
2018-12-14 20:20 ` [tip:perf/core] perf stat: Fix CSV " tip-bot for Stephane Eranian
2018-12-18 13:47 ` tip-bot for Stephane Eranian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181126184916.GD5518@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.