In PAPI we were having people with Zen2 machines being detected as Zen1.

>From what I can tell, Zen1 and Zen+ have model numbers less than 0x30
and Zen2 is above 0x30.  This is what the perf tool uses for the cutoff 
too.

Signed-off-by: Vince Weaver <vincent.wea...@maine.edu>

diff --git a/lib/pfmlib_amd64.c b/lib/pfmlib_amd64.c
index c4497ea..a3eb5d8 100644
--- a/lib/pfmlib_amd64.c
+++ b/lib/pfmlib_amd64.c
@@ -174,11 +174,10 @@ amd64_get_revision(pfm_amd64_config_t *cfg)
        } else if (cfg->family == 21) { /* family 15h */
                rev = PFM_PMU_AMD64_FAM15H_INTERLAGOS;
        } else if (cfg->family == 23) { /* family 17h */
-                switch (cfg->model) {
-                case 49:
+               if (cfg->model>=48) {
                        rev = PFM_PMU_AMD64_FAM17H_ZEN2;
-                       break;
-                default:
+               }
+               else {
                         rev = PFM_PMU_AMD64_FAM17H_ZEN1;
                 }
        } else if (cfg->family == 22) { /* family 16h */


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

Reply via email to