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, sumanthk@linux.ibm.com, svens@linux.ibm.com,
gor@linux.ibm.com, hca@linux.ibm.com
Subject: Re: [PATCH 2/6] tools/perf/json: Add cache metrics for s390 z16
Date: Mon, 13 Mar 2023 08:22:44 -0700 [thread overview]
Message-ID: <CAP-5=fW=xVYzkgQ4vUyzkiK-oQjUQ=hLwcLT6D8VjtVCXH5oSQ@mail.gmail.com> (raw)
In-Reply-To: <20230313080201.2440201-2-tmricht@linux.ibm.com>
On Mon, Mar 13, 2023 at 1:30 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
>
> Add metrics for s390 z16
> - Percentage sourced from Level 2 cache
> - Percentage sourced from Level 3 on same chip cache
> - Percentage sourced from Level 4 Local cache on same book
> - Percentage sourced from Level 4 Remote cache on different book
> - Percentage sourced from memory
>
> For details about the formulas see this documentation:
> https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf
>
> Outpuf after:
> # ./perf stat -M l4rp -- dd if=/dev/zero of=/dev/null bs=10M count=10K
> .... dd output deleted
>
> Performance counter stats for 'dd if=/dev/zero of=/dev/null bs=10M count=10K':
>
> 0 IDCW_OFF_DRAWER_CHIP_HIT # 0.00 l4rp
> 431,866 L1I_DIR_WRITES
> 2,395 IDCW_OFF_DRAWER_IV
> 0 ICW_OFF_DRAWER
> 0 IDCW_OFF_DRAWER_DRAWER_HIT
> 1,437 DCW_OFF_DRAWER
> 425,960,793 L1D_DIR_WRITES
>
> 12.165030699 seconds time elapsed
>
> 0.001037000 seconds user
> 12.162140000 seconds sys
>
> #
>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Acked-By: Sumanth Korikkar <sumanthk@linux.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
> ---
> .../arch/s390/cf_z16/transaction.json | 25 +++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json b/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json
> index 86bf83b4504e..dde0735a7d22 100644
> --- a/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json
> +++ b/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json
> @@ -18,5 +18,30 @@
> "BriefDescription": "Level One Miss per 100 Instructions",
> "MetricName": "l1mp",
> "MetricExpr": "((L1I_DIR_WRITES + L1D_DIR_WRITES) / INSTRUCTIONS) * 100"
> + },
> + {
> + "BriefDescription": "Percentage sourced from Level 2 cache",
> + "MetricName": "l2p",
> + "MetricExpr": "((DCW_REQ + DCW_REQ_IV + ICW_REQ + ICW_REQ_IV) / (L1I_DIR_WRITES + L1D_DIR_WRITES)) * 100"
> + },
> + {
> + "BriefDescription": "Percentage sourced from Level 3 on same chip cache",
> + "MetricName": "l3p",
> + "MetricExpr": "((DCW_REQ_CHIP_HIT + DCW_ON_CHIP + DCW_ON_CHIP_IV + DCW_ON_CHIP_CHIP_HIT + ICW_REQ_CHIP_HIT + ICW_ON_CHIP + ICW_ON_CHIP_IV + ICW_ON_CHIP_CHIP_HIT) / (L1I_DIR_WRITES + L1D_DIR_WRITES)) * 100"
> + },
> + {
> + "BriefDescription": "Percentage sourced from Level 4 Local cache on same book",
> + "MetricName": "l4lp",
> + "MetricExpr": "((DCW_REQ_DRAWER_HIT + DCW_ON_CHIP_DRAWER_HIT + DCW_ON_MODULE + DCW_ON_DRAWER + IDCW_ON_MODULE_IV + IDCW_ON_MODULE_CHIP_HIT + IDCW_ON_MODULE_DRAWER_HIT + IDCW_ON_DRAWER_IV + IDCW_ON_DRAWER_CHIP_HIT + IDCW_ON_DRAWER_DRAWER_HIT + ICW_REQ_DRAWER_HIT + ICW_ON_CHIP_DRAWER_HIT + ICW_ON_MODULE + ICW_ON_DRAWER) / (L1I_DIR_WRITES + L1D_DIR_WRITES)) * 100"
> + },
> + {
> + "BriefDescription": "Percentage sourced from Level 4 Remote cache on different book",
> + "MetricName": "l4rp",
> + "MetricExpr": "((DCW_OFF_DRAWER + IDCW_OFF_DRAWER_IV + IDCW_OFF_DRAWER_CHIP_HIT + IDCW_OFF_DRAWER_DRAWER_HIT + ICW_OFF_DRAWER) / (L1I_DIR_WRITES + L1D_DIR_WRITES)) * 100"
> + },
> + {
> + "BriefDescription": "Percentage sourced from memory",
> + "MetricName": "memp",
> + "MetricExpr": "((DCW_ON_CHIP_MEMORY + DCW_ON_MODULE_MEMORY + DCW_ON_DRAWER_MEMORY + DCW_OFF_DRAWER_MEMORY + ICW_ON_CHIP_MEMORY + ICW_ON_MODULE_MEMORY + ICW_ON_DRAWER_MEMORY + ICW_OFF_DRAWER_MEMORY) / (L1I_DIR_WRITES + L1D_DIR_WRITES)) * 100"
> }
> ]
> --
> 2.39.1
>
next prev parent reply other threads:[~2023-03-13 15:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 8:01 [PATCH 1/6] tools/perf/json: Add common metrics for s390 Thomas Richter
2023-03-13 8:01 ` [PATCH 2/6] tools/perf/json: Add cache metrics for s390 z16 Thomas Richter
2023-03-13 15:22 ` Ian Rogers [this message]
2023-03-13 18:33 ` Arnaldo Carvalho de Melo
2023-03-14 8:20 ` Thomas Richter
2023-03-14 16:34 ` Ian Rogers
2023-03-14 21:36 ` Arnaldo Carvalho de Melo
2023-03-22 20:59 ` Arnaldo Carvalho de Melo
2023-03-23 9:51 ` Thomas Richter
2023-03-23 10:06 ` Heiko Carstens
2023-03-23 12:59 ` Arnaldo Carvalho de Melo
2023-03-15 7:21 ` Thomas Richter
2023-03-13 8:01 ` [PATCH 3/6] tools/perf/json: Add cache metrics for s390 z15 Thomas Richter
2023-03-13 15:24 ` Ian Rogers
2023-03-13 8:01 ` [PATCH 4/6] tools/perf/json: Add cache metrics for s390 z14 Thomas Richter
2023-03-13 15:25 ` Ian Rogers
2023-03-13 8:02 ` [PATCH 5/6] tools/perf/json: Add cache metrics for s390 z13 Thomas Richter
2023-03-13 15:28 ` Ian Rogers
2023-03-13 8:02 ` [PATCH 6/6] tools/perf/json: Add metric for tlb and cache s390 Thomas Richter
2023-03-13 15:32 ` Ian Rogers
2023-03-13 15:21 ` [PATCH 1/6] tools/perf/json: Add common metrics for s390 Ian Rogers
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=fW=xVYzkgQ4vUyzkiK-oQjUQ=hLwcLT6D8VjtVCXH5oSQ@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 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.