From: Jiri Olsa <jolsa@redhat.com>
To: Jin Yao <yao.jin@linux.intel.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
mingo@redhat.com, alexander.shishkin@linux.intel.com,
Linux-kernel@vger.kernel.org, ak@linux.intel.com,
kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH] perf stat: Align CSV output for summary mode
Date: Tue, 16 Mar 2021 14:07:49 +0100 [thread overview]
Message-ID: <YFCtpVNF8coCX3UR@krava> (raw)
In-Reply-To: <YFCtfXlaKbIeEMwk@krava>
On Tue, Mar 16, 2021 at 02:07:12PM +0100, Jiri Olsa wrote:
> On Tue, Mar 16, 2021 at 03:29:00PM +0800, Jin Yao wrote:
> > perf-stat has supported the summary mode. But the summary
> > lines break the CSV output so it's hard for scripts to parse
> > the result.
> >
> > Before:
> >
> > # perf stat -x, -I1000 --interval-count 1 --summary
> > 1.001323097,8013.48,msec,cpu-clock,8013483384,100.00,8.013,CPUs utilized
> > 1.001323097,270,,context-switches,8013513297,100.00,0.034,K/sec
> > 1.001323097,13,,cpu-migrations,8013530032,100.00,0.002,K/sec
> > 1.001323097,184,,page-faults,8013546992,100.00,0.023,K/sec
> > 1.001323097,20574191,,cycles,8013551506,100.00,0.003,GHz
> > 1.001323097,10562267,,instructions,8013564958,100.00,0.51,insn per cycle
> > 1.001323097,2019244,,branches,8013575673,100.00,0.252,M/sec
> > 1.001323097,106152,,branch-misses,8013585776,100.00,5.26,of all branches
> > 8013.48,msec,cpu-clock,8013483384,100.00,7.984,CPUs utilized
> > 270,,context-switches,8013513297,100.00,0.034,K/sec
> > 13,,cpu-migrations,8013530032,100.00,0.002,K/sec
> > 184,,page-faults,8013546992,100.00,0.023,K/sec
> > 20574191,,cycles,8013551506,100.00,0.003,GHz
> > 10562267,,instructions,8013564958,100.00,0.51,insn per cycle
> > 2019244,,branches,8013575673,100.00,0.252,M/sec
> > 106152,,branch-misses,8013585776,100.00,5.26,of all branches
> >
> > The summary line loses the timestamp column, which breaks the
> > CVS output.
> >
> > We add a column at the 'timestamp' position and it just says 'summary'
> > for the summary line.
> >
> > After:
> >
> > # perf stat -x, -I1000 --interval-count 1 --summary
>
> looks ok, but maybe make the option more related to CVS, like:
>
> --x-summary, --cvs-summary ...?
>
and we'll need man page update for that
jirka
next prev parent reply other threads:[~2021-03-16 13:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 7:29 [PATCH] perf stat: Align CSV output for summary mode Jin Yao
2021-03-16 13:07 ` Jiri Olsa
2021-03-16 13:07 ` Jiri Olsa [this message]
2021-03-16 16:34 ` Andi Kleen
2021-03-16 19:05 ` Arnaldo Carvalho de Melo
2021-03-16 20:02 ` Andi Kleen
2021-03-16 21:55 ` Jiri Olsa
2021-03-17 0:51 ` Jin, Yao
2021-03-17 1:30 ` Andi Kleen
2021-03-17 1:39 ` Jin, Yao
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=YFCtpVNF8coCX3UR@krava \
--to=jolsa@redhat.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.intel.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.