From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 2/2] perf stat: Add missing aggregation headers for --metric-only CSV
Date: Sat, 21 May 2016 13:19:02 +0200 [thread overview]
Message-ID: <20160521111902.GB5761@krava> (raw)
In-Reply-To: <1463773815-25984-2-git-send-email-andi@firstfloor.org>
On Fri, May 20, 2016 at 12:50:15PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> When in CSV mode --metric-only outputs an header, unlike the other
> modes. Previously it did not properly print headers for the
> aggregation columns, so the headers were actually shifted against
> the real values.
>
> Fix this here by outputting the correct headers for CSV.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/builtin-stat.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 790eeea335cc..5d295da0e41c 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1311,6 +1311,14 @@ static int aggr_header_lens[] = {
> [AGGR_GLOBAL] = 0,
> };
>
> +static const char *aggr_header_csv[] = {
> + [AGGR_CORE] = "core,cpus,",
> + [AGGR_SOCKET] = "socket,cpus",
> + [AGGR_NONE] = "cpu,",
> + [AGGR_THREAD] = "comm-pid,",
> + [AGGR_GLOBAL] = ""
> +};
please indent properly, otherwise
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
next prev parent reply other threads:[~2016-05-21 11:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 19:50 [PATCH 1/2] perf stat: Print topology/time headers with --metric-only Andi Kleen
2016-05-20 19:50 ` [PATCH 2/2] perf stat: Add missing aggregation headers for --metric-only CSV Andi Kleen
2016-05-21 11:19 ` Jiri Olsa [this message]
2016-05-21 11:17 ` [PATCH 1/2] perf stat: Print topology/time headers with --metric-only Jiri Olsa
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=20160521111902.GB5761@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox