Blame SOURCES/oprofile-rhbz1426426.patch

c532ac
commit 6b4aaf9a6c810be7c696b9edb9ad232a02a83e0b
c532ac
Author: Carl E. Love <cel@us.ibm.com>
c532ac
Date:   Mon Dec 19 09:31:13 2016 -0800
c532ac
c532ac
    Add support for the IBM POWER 8 NV and NVL variants.
c532ac
    
c532ac
    Add support for the IBM POWER 8 NV and NVL variants.
c532ac
    
c532ac
    The processor performance counter unit is identical for the various
c532ac
    variants of the POWER 8 processor.  The variants vary some for the
c532ac
    non-cpu events.
c532ac
    
c532ac
    Signed-off-by: Carl Love <cel@us.ibm.com>
c532ac
c532ac
diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c
c532ac
index d03f9d6..0e1f6e4 100644
c532ac
--- a/libop/op_cpu_type.c
c532ac
+++ b/libop/op_cpu_type.c
c532ac
@@ -330,6 +330,11 @@ static op_cpu _get_ppc64_cpu_type(void)
c532ac
 	if (strncmp(cpu_name_lowercase, "power8e", 7) == 0)
c532ac
 		cpu_name_lowercase[6] = '\0';
c532ac
 
c532ac
+	/* The POWER8NV and POWER8NVL variants have the same core PMU events as
c532ac
+	 * POWER8. */
c532ac
+	if (strncmp(cpu_name_lowercase, "power8nv", 8) == 0)
c532ac
+		cpu_name_lowercase[6] = '\0';
c532ac
+
c532ac
 	cpu_type_str[0] = '\0';
c532ac
 	strcat(cpu_type_str, "ppc64/");
c532ac
 	strncat(cpu_type_str, cpu_name_lowercase, len);