Blame SOURCES/oprofile-rhbz1426426.patch

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