diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-07-04 14:16:20 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-04 19:39:01 -0300 |
commit | c60da22aca8755b77b7f4d4caf57ada8654db939 (patch) | |
tree | 850dc675f62c2f3a3097a6d411d346002d86d067 /tools/perf/util/env.h | |
parent | 6430a94ead2a4c8f350441351a735303eb6d1c8a (diff) | |
download | linux-c60da22aca8755b77b7f4d4caf57ada8654db939.tar.bz2 |
perf header: Transform nodes string info to struct
Storing NUMA info within struct numa_node instead of strings. This way
it's usable in future patches.
Also it turned out it's slightly less code involved than using strings.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1467634583-29147-2-git-send-email-jolsa@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.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/perf/util/env.h b/tools/perf/util/env.h index 56cffb60a0b4..b164dfd2dcbf 100644 --- a/tools/perf/util/env.h +++ b/tools/perf/util/env.h @@ -2,6 +2,7 @@ #define __PERF_ENV_H #include <linux/types.h> +#include "cpumap.h" struct cpu_topology_map { int socket_id; @@ -18,6 +19,13 @@ struct cpu_cache_level { char *map; }; +struct numa_node { + u32 node; + u64 mem_total; + u64 mem_free; + struct cpu_map *map; +}; + struct perf_env { char *hostname; char *os_release; @@ -40,11 +48,11 @@ struct perf_env { const char **cmdline_argv; char *sibling_cores; char *sibling_threads; - char *numa_nodes; char *pmu_mappings; struct cpu_topology_map *cpu; struct cpu_cache_level *caches; int caches_cnt; + struct numa_node *numa_nodes; }; extern struct perf_env perf_env; |