From 317269966c01a3e1d10fcf762ebafce1889eb616 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 04 2018 10:26:30 +0000 Subject: import devtoolset-7-oprofile-1.2.0-2.el7.1 --- diff --git a/SOURCES/oprofile-power9.patch b/SOURCES/oprofile-power9.patch new file mode 100644 index 0000000..b41485a --- /dev/null +++ b/SOURCES/oprofile-power9.patch @@ -0,0 +1,45 @@ +commit c474cd3ddfcb2fe68f38745675f4c4d9ef79dfc5 +Author: Carl Love +Date: Tue Mar 27 13:07:37 2018 -0700 + + PowerPC: Remove trailing comma in cpu_name. + + Will: + + I redid the patch as follows per your suggestions. I was able to get + on to a system where the issue occurs and test the patch. The patch + seems to work fine. + + Carl Love + + ----------------------------------------------------------------------- + + The processor type for some Power 9 systems had a comma after POWER9. + Remove the comma before returning the string for the CPU. + +diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c +index feea9487..d2babd18 100644 +--- a/libop/op_cpu_type.c ++++ b/libop/op_cpu_type.c +@@ -154,17 +154,17 @@ static char * _get_cpuinfo_cpu_type_line(char * buf, int len, const char * prefi + /* if token param 0 then read the whole line else + * first token only. */ + if (token == 0) { +- /* Trim trailing whitespace */ ++ /* Trim trailing whitespace and commas */ + end = buf + strlen(buf) - 1; +- while (isspace(*end)) ++ while (isspace(*end) || *end == ',') + --end; + *(++end) = '\0'; + break; + } else { + /* Scan ahead to the end of the token */ +- while (*buf && !isspace(*buf)) ++ while (*buf && !(isspace(*buf) || *buf == ',')) + ++buf; +- /* Trim trailing whitespace */ ++ /* Trim trailing whitespace and commas */ + *buf = '\0'; + break; + } diff --git a/SPECS/oprofile.spec b/SPECS/oprofile.spec index 6224266..30e019f 100644 --- a/SPECS/oprofile.spec +++ b/SPECS/oprofile.spec @@ -3,13 +3,14 @@ Summary: System wide profiler Name: %{?scl_prefix}oprofile Version: 1.2.0 -Release: 2%{?dist} +Release: 2%{?dist}.1 License: GPLv2+ and LGPLv2+ Group: Development/System # Source0: http://downloads.sourceforge.net/oprofile/oprofile-%{version}.tar.gz #FIXME a workaround until java-1.6.0-openjdk-devel is available on all archs Source1: openjdk-include.tar.gz +Patch1: oprofile-power9.patch Requires: binutils Requires: which Requires(pre): shadow-utils @@ -86,6 +87,7 @@ agent library. %prep %setup -q -n oprofile-%{version} -a1 +%patch1 -p1 -b .power9 ./autogen.sh @@ -167,6 +169,9 @@ exit 0 %endif %changelog +* Wed Apr 25 2018 William Cohen - 1.2.0-2.1 +- Power9 cpu recognition. + * Thu Feb 22 2018 William Cohen - 1.2.0-2 - Rebuilt.