aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/env.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-09-09 10:37:01 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-14 12:50:28 -0300
commitaa36ddd7afbb0a3db216c1391e28cd6d80ed1706 (patch)
treec4ade785d39be7b6ee6f63e2ed71f7f478a8b873 /tools/perf/util/env.h
parentperf cpu_map: Use sysfs__read_int in get_{core,socket}_id() (diff)
downloadwireguard-linux-aa36ddd7afbb0a3db216c1391e28cd6d80ed1706.tar.xz
wireguard-linux-aa36ddd7afbb0a3db216c1391e28cd6d80ed1706.zip
perf env: Introduce read_cpu_topology_map() method
Out of the code to write the cpu topology map in the perf.data file header. Now if one needs the CPU topology map for the running machine, one needs to call perf_env__read_cpu_topology_map(perf_env) and the info will be stored in perf_env.cpu. For now we're using a global perf_env variable, that will have its contents freed after we run a builtin. v2: Check perf_env__read_cpu_topology_map() return in write_cpu_topology() (Kan Liang) Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1441828225-667-5-git-send-email-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/env.h')
-rw-r--r--tools/perf/util/env.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/env.h b/tools/perf/util/env.h
index d0d1a9681531..0132b9557c02 100644
--- a/tools/perf/util/env.h
+++ b/tools/perf/util/env.h
@@ -39,4 +39,6 @@ void perf_env__exit(struct perf_env *env);
int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]);
+int perf_env__read_cpu_topology_map(struct perf_env *env);
+
#endif /* __PERF_ENV_H */