Perfmon mapfile Family-model's can contain 4 hyphens, e.g.
"GenuineIntel-6-55-[56789ABCDEF]"

This simply slices the hyphen-split Family-model to the first 3
elements, so that the list unpack does not throw an exception saying
that there are too many values to unpack.

diff --git a/contrib/gen_autofdo_event.py b/contrib/gen_autofdo_event.py
index c97460c61c6..cd77a8686d9 100755
--- a/contrib/gen_autofdo_event.py
+++ b/contrib/gen_autofdo_event.py
@@ -94,7 +94,7 @@ for j in u:
     n = j.rstrip().split(',')
     if len(n) >= 4 and (args.all or n[0] == cpu) and n[3] == "core":
         if args.all:
-            vendor, fam, model = n[0].split("-")
+            vendor, fam, model = n[0].split("-")[:3]
             model = int(model, 16)
         cpufound += 1
         found += find_event(baseurl + n[2], model)

Reply via email to