Arnaldo Carvalho de Melo | f0ce888 | 2015-09-08 13:30:00 -0300 | [diff] [blame] | 1 | #ifndef __PERF_ENV_H |
| 2 | #define __PERF_ENV_H |
| 3 | |
| 4 | struct cpu_topology_map { |
| 5 | int socket_id; |
| 6 | int core_id; |
| 7 | }; |
| 8 | |
| 9 | struct 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 Liang | e0838e0 | 2015-09-10 11:03:05 -0300 | [diff] [blame^] | 19 | unsigned int msr_pmu_type; |
Arnaldo Carvalho de Melo | f0ce888 | 2015-09-08 13:30:00 -0300 | [diff] [blame] | 20 | |
| 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 Melo | b699869 | 2015-09-08 16:58:20 -0300 | [diff] [blame] | 36 | extern struct perf_env perf_env; |
| 37 | |
Arnaldo Carvalho de Melo | f0ce888 | 2015-09-08 13:30:00 -0300 | [diff] [blame] | 38 | void perf_env__exit(struct perf_env *env); |
| 39 | |
Arnaldo Carvalho de Melo | b699869 | 2015-09-08 16:58:20 -0300 | [diff] [blame] | 40 | int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]); |
| 41 | |
Arnaldo Carvalho de Melo | f0ce888 | 2015-09-08 13:30:00 -0300 | [diff] [blame] | 42 | #endif /* __PERF_ENV_H */ |