All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Ilya Pronin <ipronin@twitter.com>
Subject: Re: [PATCH] perf stat: fix cvs output format
Date: Tue, 6 Mar 2018 14:30:06 -0300	[thread overview]
Message-ID: <20180306173006.GB2213@redhat.com> (raw)
In-Reply-To: <20180306170011.GD25017@tassilo.jf.intel.com>

Em Tue, Mar 06, 2018 at 09:00:11AM -0800, Andi Kleen escreveu:
> On Mon, Mar 05, 2018 at 10:43:53PM -0800, Cong Wang wrote:
> > From: Ilya Pronin <ipronin@twitter.com>
> > 
> > When printing stats in CSV mode, perf stat appends extra CSV
> > separators when counter is not supported:
> > 
> > <not supported>,,L1-dcache-store-misses,mesos/bd442f34-2b4a-47df-b966-9b281f9f56fc,0,100.00,,,,
> > 
> > which causes a failure of parsing fields. The numbers of separators
> 
> Causes failure in what?
> 
> > is fixed for each line, no matter supported or not supported.
> 
> I don't think they're extra fields, there are cases where they can be filled out

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?

- Arnaldo

> for variance, metricvalue, unit. And other code in perf too uses empty
> fields when something is not available.
> 
>         - optional usec time stamp in fractions of second (with -I xxx)
>         - optional CPU, core, or socket identifier
>         - optional number of logical CPUs aggregated
>         - counter value
>         - unit of the counter value or empty
>         - event name
>         - run time of counter
>         - percentage of measurement time the counter was running
>         - optional variance if multiple values are collected with -r  
>         - optional metric value
>         - optional unit of metric
> 
> 
> -Andi

  reply	other threads:[~2018-03-06 17:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  6:43 [PATCH] perf stat: fix cvs output format Cong Wang
2018-03-06  7:58 ` Jiri Olsa
2018-03-06 13:54   ` Arnaldo Carvalho de Melo
2018-03-06 17:00 ` Andi Kleen
2018-03-06 17:30   ` Arnaldo Carvalho de Melo [this message]
2018-03-06 18:57     ` Andi Kleen
2018-03-06 17:47   ` Cong Wang
2018-03-06 17:53     ` Andi Kleen
2018-03-06 19:03       ` Cong Wang
2018-03-06 20:31         ` Ilya Pronin
2018-03-07 17:04           ` Andi Kleen
2018-03-08 21:52             ` Ilya Pronin
2018-03-09  0:06               ` Andi Kleen
2018-03-07  8:27 ` [tip:perf/urgent] perf stat: Fix CVS output format for non-supported counters tip-bot for Ilya Pronin

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=20180306173006.GB2213@redhat.com \
    --to=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=ipronin@twitter.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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.