diff options
author | Jiri Olsa | 2017-10-11 17:01:24 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo | 2017-10-23 16:20:54 +0200 |
commit | 696e2457e9fd285034cd30cd8c93ece5e6cfe35a (patch) | |
tree | 5b5b512cb3ac15953d10b7ab719054f228311675 /tools/perf/arch/x86/annotate | |
parent | perf list: Fix group description in the man page (diff) | |
download | kernel-qcow2-linux-696e2457e9fd285034cd30cd8c93ece5e6cfe35a.tar.gz kernel-qcow2-linux-696e2457e9fd285034cd30cd8c93ece5e6cfe35a.tar.xz kernel-qcow2-linux-696e2457e9fd285034cd30cd8c93ece5e6cfe35a.zip |
perf annotate: Remove arch::cpuid_parse callback
There's no need for extra cpuid_parse arch callback, it can be handled
directly in init callback.
Adding the init function to x86 to cover the cpuid initialization.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171011150158.11895-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/arch/x86/annotate')
-rw-r--r-- | tools/perf/arch/x86/annotate/instructions.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c index d84b72063a30..563cd4564041 100644 --- a/tools/perf/arch/x86/annotate/instructions.c +++ b/tools/perf/arch/x86/annotate/instructions.c @@ -122,3 +122,17 @@ static int x86__cpuid_parse(struct arch *arch, char *cpuid) return -1; } + +static int x86__annotate_init(struct arch *arch, char *cpuid) +{ + int err = 0; + + if (arch->initialized) + return 0; + + if (cpuid) + err = x86__cpuid_parse(arch, cpuid); + + arch->initialized = true; + return err; +} |