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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
6430a94ead
commit
c60da22aca
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user