public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf vendor events amd: Fix Zen 5 MAB allocation events
@ 2026-01-22  8:09 Sandipan Das
  2026-01-22 16:00 ` Ian Rogers
  0 siblings, 1 reply; 3+ messages in thread
From: Sandipan Das @ 2026-01-22  8:09 UTC (permalink / raw)
  To: linux-perf-users, linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, James Clark, Suyash Mahar,
	Ravi Bangoria, Ananth Narayan, Sandipan Das

The unit masks for PMCx041 vary across different generations of Zen
processors. Fix the Zen 5 events based on PMCx041 as they incorrectly
use the same unit masks as that of Zen 4.

Fixes: 45c072f2537a ("perf vendor events amd: Add Zen 5 core events")
Reported-by: Suyash Mahar <smahar@meta.com>
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
---
 tools/perf/pmu-events/arch/x86/amdzen5/load-store.json | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json b/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json
index ff6627a77805..06bbaea15925 100644
--- a/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json
+++ b/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json
@@ -70,19 +70,19 @@
     "EventName": "ls_mab_alloc.load_store_allocations",
     "EventCode": "0x41",
     "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for load-store allocations.",
-    "UMask": "0x3f"
+    "UMask": "0x07"
   },
   {
     "EventName": "ls_mab_alloc.hardware_prefetcher_allocations",
     "EventCode": "0x41",
     "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for hardware prefetcher allocations.",
-    "UMask": "0x40"
+    "UMask": "0x08"
   },
   {
     "EventName": "ls_mab_alloc.all_allocations",
     "EventCode": "0x41",
     "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for all types of allocations.",
-    "UMask": "0x7f"
+    "UMask": "0x0f"
   },
   {
     "EventName": "ls_dmnd_fills_from_sys.local_l2",
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf vendor events amd: Fix Zen 5 MAB allocation events
  2026-01-22  8:09 [PATCH] perf vendor events amd: Fix Zen 5 MAB allocation events Sandipan Das
@ 2026-01-22 16:00 ` Ian Rogers
  2026-01-26 20:35   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2026-01-22 16:00 UTC (permalink / raw)
  To: Sandipan Das
  Cc: linux-perf-users, linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark,
	Suyash Mahar, Ravi Bangoria, Ananth Narayan

On Thu, Jan 22, 2026 at 12:10 AM Sandipan Das <sandipan.das@amd.com> wrote:
>
> The unit masks for PMCx041 vary across different generations of Zen
> processors. Fix the Zen 5 events based on PMCx041 as they incorrectly
> use the same unit masks as that of Zen 4.
>
> Fixes: 45c072f2537a ("perf vendor events amd: Add Zen 5 core events")
> Reported-by: Suyash Mahar <smahar@meta.com>
> Signed-off-by: Sandipan Das <sandipan.das@amd.com>

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/pmu-events/arch/x86/amdzen5/load-store.json | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json b/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json
> index ff6627a77805..06bbaea15925 100644
> --- a/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json
> +++ b/tools/perf/pmu-events/arch/x86/amdzen5/load-store.json
> @@ -70,19 +70,19 @@
>      "EventName": "ls_mab_alloc.load_store_allocations",
>      "EventCode": "0x41",
>      "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for load-store allocations.",
> -    "UMask": "0x3f"
> +    "UMask": "0x07"
>    },
>    {
>      "EventName": "ls_mab_alloc.hardware_prefetcher_allocations",
>      "EventCode": "0x41",
>      "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for hardware prefetcher allocations.",
> -    "UMask": "0x40"
> +    "UMask": "0x08"
>    },
>    {
>      "EventName": "ls_mab_alloc.all_allocations",
>      "EventCode": "0x41",
>      "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for all types of allocations.",
> -    "UMask": "0x7f"
> +    "UMask": "0x0f"
>    },
>    {
>      "EventName": "ls_dmnd_fills_from_sys.local_l2",
> --
> 2.43.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf vendor events amd: Fix Zen 5 MAB allocation events
  2026-01-22 16:00 ` Ian Rogers
@ 2026-01-26 20:35   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-01-26 20:35 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Sandipan Das, linux-perf-users, linux-kernel, Peter Zijlstra,
	Ingo Molnar, Namhyung Kim, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Adrian Hunter, James Clark, Suyash Mahar,
	Ravi Bangoria, Ananth Narayan

On Thu, Jan 22, 2026 at 08:00:09AM -0800, Ian Rogers wrote:
> On Thu, Jan 22, 2026 at 12:10 AM Sandipan Das <sandipan.das@amd.com> wrote:
> > The unit masks for PMCx041 vary across different generations of Zen
> > processors. Fix the Zen 5 events based on PMCx041 as they incorrectly
> > use the same unit masks as that of Zen 4.

> > Fixes: 45c072f2537a ("perf vendor events amd: Add Zen 5 core events")
> > Reported-by: Suyash Mahar <smahar@meta.com>
> > Signed-off-by: Sandipan Das <sandipan.das@amd.com>
 
> Reviewed-by: Ian Rogers <irogers@google.com>

Thanks, applied to perf-tools-next,

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-26 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22  8:09 [PATCH] perf vendor events amd: Fix Zen 5 MAB allocation events Sandipan Das
2026-01-22 16:00 ` Ian Rogers
2026-01-26 20:35   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox