diff options
author | Namhyung Kim <[email protected]> | 2012-09-24 17:15:02 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-09-24 11:47:27 -0300 |
commit | 2f9e97aa8b4c6220c0770a966fb99d7366679813 (patch) | |
tree | 9290ce9a6c7ceb7fc1c84b969a27643abbf73fbd | |
parent | 3d7eb86b9d84e7493c8c835fbcd2a3fe4a1f5937 (diff) |
perf kvm: Use perf_session_env for reading cpuid
We have processed and saved cpuid information to perf_session_env so
reuse it for get_cpu_isa().
Signed-off-by: Namhyung Kim <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Dong Hao <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Xiao Guangrong <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/builtin-kvm.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 3eb53e33c02b..a28c9cad9048 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; } |