blob: d0d1a9681531a58ed634aa55b3c6a8bedb417c76 [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;
Kan Liange0838e02015-09-10 11:03:05 -030019 unsigned int msr_pmu_type;
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -030020
21 int nr_cmdline;
22 int nr_sibling_cores;
23 int nr_sibling_threads;
24 int nr_numa_nodes;
25 int nr_pmu_mappings;
26 int nr_groups;
27 char *cmdline;
28 const char **cmdline_argv;
29 char *sibling_cores;
30 char *sibling_threads;
31 char *numa_nodes;
32 char *pmu_mappings;
33 struct cpu_topology_map *cpu;
34};
35
Arnaldo Carvalho de Melob6998692015-09-08 16:58:20 -030036extern struct perf_env perf_env;
37
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -030038void perf_env__exit(struct perf_env *env);
39
Arnaldo Carvalho de Melob6998692015-09-08 16:58:20 -030040int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]);
41
Arnaldo Carvalho de Melof0ce8882015-09-08 13:30:00 -030042#endif /* __PERF_ENV_H */