Hi,

We have been doing some testing of libpfm on AMD Zen 4 processors.  One of the 
the issues that came up that libpfm identified AMD Genoa processors as Zen 4, 
but did not identify the AMD Bergamo processors as Zen4 processors.  This 
appears to be due to the following code in lib/pfmlib_amd64.c:

        } else if (cfg->family == 25) { /* family 19h */
                if (cfg->model <= 0x0f || (cfg->model >= 0x20 && cfg->model <= 
0x5f)) {
                  rev = PFM_PMU_AMD64_FAM19H_ZEN3;
                } else if (cfg->model == 17) {
                        rev = PFM_PMU_AMD64_FAM19H_ZEN4;
                }
        }

The Genoa processor has the listed model number of 17, but the Bergamo has a 
different module number (160) and does not match as a result.  I took a look at 
the kernel's perf code to see if there was additional model numbers listed in 
there.  The kernel is using capabilities bits to determine what features to 
enable for zen4 so didn't have additional model numbers listed for zen4 
processors.  Looking around there doesn't seem to be a good place enumerating 
the possible AMD zen4 processor model numbers.  It would be nice to avoid the 
having to tweak model number matchine for zen4 every time a new zen4 model 
comes out.

-Will



_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to