mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
178d0b5b8dadapted the Zen 5 pattern matching from Linux perf. However, Linux prints CPU models with a single digit when under 0xF (allowing |[[:xdigit:]] to match 0h-Fh), whereas hwpmc/libpmc formats model numbers with two leading hex digits (00h-0Fh). Fix the pattern to explicitly cover two-digit hex models in the 00h-0Fh range, and add a test case verifying table selection across Zen 5 and Zen 6 cpuid strings. Reviewed by: Ali Mashtizadeh <[email protected]> Signed-off-by: Osvaldo Janeri Filho <[email protected]> Fixes:178d0b5b8d("libpmc: Import AMD Zen 6 PMU events.") Sponsored by: Advanced Micro Devices, Inc. Differential Revision: https://reviews.freebsd.org/D60625