HomeFreeBSD

libpmc: Fix the L3 counters for AMD Zen 1-4

Description

libpmc: Fix the L3 counters for AMD Zen 1-4

On AMD processors libpmc was using the topic field (based on filename) to
determine the counter's subclass. Unfortunately, the JSON definitions for
AMD Zen 1-4 have the L3 counters in files shared with other counters.

This change has libpmc to use the pmu field (which is derived from the Unit
field in JSON) to determine the correct counter subclass.

Reviewed by: mhorne
MFC after: 2 weeks
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1984

Details

Provenance
ali_mashtizadeh.comAuthored on Jan 23 2026, 5:34 AM
mhorneCommitted on Feb 3 2026, 3:21 PM
Parents
rG93450913086e: powerpc/pmap: Use a constant for HPT superpage shift
Branches
Unknown
Tags
Unknown