linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Andrew Kilroy <andrew.kilroy@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>,
	"acme@kernel.org" <acme@kernel.org>
Cc: Will Deacon <will@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Leo Yan <leo.yan@linaro.org>, Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 1/1] perf arm64: Implement --topdown with metrics
Date: Fri, 17 Dec 2021 10:19:31 +0000	[thread overview]
Message-ID: <48437bee-9c39-38ba-e990-ba9a6a5378b4@huawei.com> (raw)
In-Reply-To: <20211214184240.24215-2-andrew.kilroy@arm.com>

On 14/12/2021 18:42, Andrew Kilroy wrote:
> This patch implements the --topdown option by making use of metrics to
> dictate what counters are obtained in order to show the various topdown
> columns, e.g.  Frontend Bound, Backend Bound, Retiring and Bad
> Speculation.
> 
> The MetricGroup name is used to identify which set of metrics are to be
> shown.  For the moment use TopDownL1 and enable for arm64
> 
> Signed-off-by: Andrew Kilroy<andrew.kilroy@arm.com>

This works in that it gives results, but does not supply the same output 
format as for x86 nor has same restrictions in usage (-a commandline 
required, for example, below).

For my x86 broadwell:

john@localhost:~/linux/tools/perf> sudo ./perf stat --topdown  sleep 1
top down event configuration requires system-wide mode (-a)

john@localhost:~/linux/tools/perf> sudo ./perf stat --topdown -a sleep 1
Performance counter stats for 'system wide':

                                    retiring      bad speculation 
frontend bound        backend bound
S0-D0-C0           2                29.2%                 6.3% 
      37.4%                27.1%
S0-D0-C1           2                20.4%                 6.2% 
      42.1%                31.3%

       0.998007338 seconds time elapsed

john@localhost:~/linux/tools/perf>

---

Then my arm64 hip08 platform:

john@debian:~/kernel-dev/tools/perf$ sudo ./perf stat  --topdown sleep 1

  Performance counter stats for 'sleep 1':

             retiring      bad_speculation        backend_bound 
frontend_bound
                 0.19                 0.17                 0.27 
        0.37

        1.000832714 seconds time elapsed

        0.000891000 seconds user
        0.000000000 seconds sys

And there is no colouring for results which are above/below standard 
thresholds (see stat-shadow.c:get_radio_color()).

My impression is that we're not plugging the results from 
metricgroup__parse_groups_to_evlist() into the --topdown print 
functionality properly.

Thanks,
John

  parent reply	other threads:[~2021-12-17 10:20 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 12:37 [PATCH v2 0/2] perf vendor events: Arm Neoverse N2 Andrew Kilroy
2021-12-10 12:37 ` [PATCH v2 1/2] perf vendor events: For the " Andrew Kilroy
2021-12-10 13:21   ` John Garry
2021-12-14 18:42     ` [RFC PATCH 0/1] topdown with metrics Andrew Kilroy
2021-12-14 18:42       ` [RFC PATCH 1/1] perf arm64: Implement --topdown " Andrew Kilroy
2021-12-14 20:32         ` Ian Rogers
2021-12-15 10:38           ` James Clark
2021-12-15 10:52           ` John Garry
2021-12-15 12:38             ` Andrew Kilroy
2021-12-15 12:53               ` John Garry
2022-01-06 16:33                 ` Andrew Kilroy
2022-01-06 18:24                   ` John Garry
2022-01-11 15:07                     ` [RFC PATCH v2 0/5] topdown " Andrew Kilroy
2022-01-11 15:07                       ` [RFC PATCH v2 1/5] perf stat: Implement --topdown " Andrew Kilroy
2022-01-28 13:44                         ` John Garry
2022-01-11 15:07                       ` [RFC PATCH v2 2/5] perf stat: Topdown kernel events setup function Andrew Kilroy
2022-01-11 15:07                       ` [RFC PATCH v2 3/5] perf stat: Topdown json metrics " Andrew Kilroy
2022-01-11 15:07                       ` [RFC PATCH v2 4/5] perf stat: Detect if topdown kernel events supported Andrew Kilroy
2022-01-11 15:07                       ` [RFC PATCH v2 5/5] perf stat: Ensure only topdown kernel events used on x86 Andrew Kilroy
2022-01-20  9:26                       ` [RFC PATCH v2 0/5] topdown with metrics John Garry
2022-01-20 16:22                         ` Al Grant
2022-01-27 11:42                         ` Andrew Kilroy
2022-02-08 15:58                           ` Andrew Kilroy
2021-12-20 17:21             ` [RFC PATCH 1/1] perf arm64: Implement --topdown " Andrew Kilroy
2021-12-21 14:03               ` Andi Kleen
2022-01-27 11:11                 ` Andrew Kilroy
2021-12-17 10:19         ` John Garry [this message]
2021-12-21 14:31           ` Andrew Kilroy
2022-01-05 16:58           ` Andrew Kilroy
2022-01-28 18:00             ` John Garry
2021-12-10 12:37 ` [PATCH v2 2/2] perf vendor events: Rename arm64 arch std event files Andrew Kilroy
2021-12-10 13:46   ` John Garry
2021-12-10 19:01     ` Arnaldo Carvalho de Melo

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=48437bee-9c39-38ba-e990-ba9a6a5378b4@huawei.com \
    --to=john.garry@huawei.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrew.kilroy@arm.com \
    --cc=jolsa@redhat.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=namhyung@kernel.org \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).