From: Ian Rogers <irogers@google.com>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org, svens@linux.ibm.com, gor@linux.ibm.com,
sumanthk@linux.ibm.com, hca@linux.ibm.com
Subject: Re: [PATCH 1/2 v2] perf report: Fix PAI counter names for s390 virtual machines
Date: Mon, 25 Mar 2024 09:01:36 -0700 [thread overview]
Message-ID: <CAP-5=fWMdgWe8FqeMcjf6ZCq5fdKWmrROCqnAsKYD9iXQxYEKQ@mail.gmail.com> (raw)
In-Reply-To: <20240321071512.2916952-1-tmricht@linux.ibm.com>
On Thu, Mar 21, 2024 at 12:15 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
>
> s390 introduced Processor Activity Instrumentation (PAI) counter
> facility on LPAR and virtual machines z/VM for models 3931 and 3932.
> These counters are stored as raw data in the perf.data file and are
> displayed with command
>
> # ./perf report -i /tmp//perfout-635468 -D | grep Counter
> Counter:007 <unknown> Value:0x00000000000186a0
> Counter:032 <unknown> Value:0x0000000000000001
> Counter:032 <unknown> Value:0x0000000000000001
> Counter:032 <unknown> Value:0x0000000000000001
> #
>
> However on z/VM virtual machines, the counter names are not retrieved
> from the PMU and are shown as '<unknown>'.
> This is caused by the CPU string saved in the mapfile.csv for this
> machine:
>
> ^IBM.393[12].*3\.7.[[:xdigit:]]+$,3,cf_z16,core
>
> This string contains the CPU Measurement facility first and second
> version number and authorization level (3\.7.[[:xdigit:]]+).
> These numbers do not apply to the PAI counter facility.
> In fact they can be omitted.
> Shorten the CPU identification string for this machine to manufacturer
> and model. This is sufficient for all PMU devices.
>
> Output after:
> # ./perf report -i /tmp//perfout-635468 -D | grep Counter
> Counter:007 km_aes_128 Value:0x00000000000186a0
> Counter:032 kma_gcm_aes_256 Value:0x0000000000000001
> Counter:032 kma_gcm_aes_256 Value:0x0000000000000001
> Counter:032 kma_gcm_aes_256 Value:0x0000000000000001
> #
>
> Fixes: b539deafbadb ("perf report: Add s390 raw data interpretation for PAI counters")
>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
> ---
> tools/perf/pmu-events/arch/s390/mapfile.csv | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/pmu-events/arch/s390/mapfile.csv b/tools/perf/pmu-events/arch/s390/mapfile.csv
> index a918e1af77a5..b22648d12751 100644
> --- a/tools/perf/pmu-events/arch/s390/mapfile.csv
> +++ b/tools/perf/pmu-events/arch/s390/mapfile.csv
> @@ -5,4 +5,4 @@ Family-model,Version,Filename,EventType
> ^IBM.296[45].*[13]\.[1-5].[[:xdigit:]]+$,1,cf_z13,core
> ^IBM.390[67].*[13]\.[1-5].[[:xdigit:]]+$,3,cf_z14,core
> ^IBM.856[12].*3\.6.[[:xdigit:]]+$,3,cf_z15,core
> -^IBM.393[12].*3\.7.[[:xdigit:]]+$,3,cf_z16,core
> +^IBM.393[12].*$,3,cf_z16,core
> --
> 2.44.0
>
prev parent reply other threads:[~2024-03-25 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 7:15 [PATCH 1/2 v2] perf report: Fix PAI counter names for s390 virtual machines Thomas Richter
2024-03-21 7:15 ` [PATCH 2/2 v2] perf stat: do not fail on metrics on s390 zvm systems Thomas Richter
2024-03-25 16:02 ` Ian Rogers
2024-03-25 16:01 ` Ian Rogers [this message]
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='CAP-5=fWMdgWe8FqeMcjf6ZCq5fdKWmrROCqnAsKYD9iXQxYEKQ@mail.gmail.com' \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sumanthk@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=tmricht@linux.ibm.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 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).