summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r--tools/perf/builtin-kvm.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 3eb53e33c02..a28c9cad904 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -664,16 +664,9 @@ static struct perf_tool eops = {
static int get_cpu_isa(struct perf_session *session)
{
- char *cpuid;
+ char *cpuid = session->header.env.cpuid;
int isa;
- cpuid = perf_header__read_feature(session, HEADER_CPUID);
-
- if (!cpuid) {
- pr_err("read HEADER_CPUID failed.\n");
- return -ENOTSUP;
- }
-
if (strstr(cpuid, "Intel"))
isa = 1;
else if (strstr(cpuid, "AMD"))
@@ -683,7 +676,6 @@ static int get_cpu_isa(struct perf_session *session)
isa = -ENOTSUP;
}
- free(cpuid);
return isa;
}