summaryrefslogtreecommitdiffstats
path: root/tools/perf/arch/x86/annotate/instructions.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/arch/x86/annotate/instructions.c')
-rw-r--r--tools/perf/arch/x86/annotate/instructions.c14
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 4adfb4ce2864..5bd1ba8c0282 100644
--- a/tools/perf/arch/x86/annotate/instructions.c
+++ b/tools/perf/arch/x86/annotate/instructions.c
@@ -123,3 +123,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;
+}