blob: 70124d9a1624b6eac1bdf31ea2f937f98f90caac [file] [log] [blame]
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -03001#ifndef __PERF_ENV_H
2#define __PERF_ENV_H
3
4struct cpu_topology_map {
5 int socket_id;
6 int core_id;
7};
8
9struct perf_env {
10 char *hostname;
11 char *os_release;
12 char *version;
13 char *arch;
14 int nr_cpus_online;
15 int nr_cpus_avail;
16 char *cpu_desc;
17 char *cpuid;
18 unsigned long long total_mem;
19
20 int nr_cmdline;
21 int nr_sibling_cores;
22 int nr_sibling_threads;
23 int nr_numa_nodes;
24 int nr_pmu_mappings;
25 int nr_groups;
26 char *cmdline;
27 const char **cmdline_argv;
28 char *sibling_cores;
29 char *sibling_threads;
30 char *numa_nodes;
31 char *pmu_mappings;
32 struct cpu_topology_map *cpu;
33};
34
Arnaldo Carvalho de Melob6998692015-09-08 16:58:20 -030035extern struct perf_env perf_env;
36
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -030037void perf_env__exit(struct perf_env *env);
38
Arnaldo Carvalho de Melob6998692015-09-08 16:58:20 -030039int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]);
40
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -030041#endif /* __PERF_ENV_H */