perf tools: Make CPUINFO_PROC an array to support different kernel versions
authorWang Nan <wangnan0@huawei.com>
Fri, 24 Oct 2014 01:45:26 +0000 (09:45 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 29 Oct 2014 12:27:36 +0000 (10:27 -0200)
commit493c3031336a49bbd50777dc2adfa52a49933d43
treefbd5057449639cca5bd2dd0293ec19b8243ea30f
parent380b5143ab76de71572c7a30e68c8e22b94bee52
perf tools: Make CPUINFO_PROC an array to support different kernel versions

After kernel 3.7 (commit b4b8f770eb10a1bccaf8aa0ec1956e2dd7ed1e0a),
/proc/cpuinfo replaces 'Processor' to 'model name'.

This patch makes CPUINFO_PROC to an array and provides two choices for
ARM, makes it compatible for different kernel version.

v1 -> v2: minor changes as suggested by Namhyung Kim:

 - Doesn't pass @h and @evlist to __write_cpudesc;
 - Coding style fix.

v2 -> v3:
  - Rebase:
    git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1414115126-7479-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/perf-sys.h
tools/perf/util/header.c