mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 20:47:04 +07:00
b699869285
Move this from two globals to perf_env global, that eventually will be just perf_header->env or something else, to ease the refactoring series, leave it as a global and go on reading more of its fields, not as part of the header writing process but as a perf_env init one that will be used for perf.data-less situations. Tested-by: Wang Nan <wangnan0@huawei.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-2j78tdf8zn1ci0y6ji15bifj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
42 lines
801 B
C
42 lines
801 B
C
#ifndef __PERF_ENV_H
|
|
#define __PERF_ENV_H
|
|
|
|
struct cpu_topology_map {
|
|
int socket_id;
|
|
int core_id;
|
|
};
|
|
|
|
struct perf_env {
|
|
char *hostname;
|
|
char *os_release;
|
|
char *version;
|
|
char *arch;
|
|
int nr_cpus_online;
|
|
int nr_cpus_avail;
|
|
char *cpu_desc;
|
|
char *cpuid;
|
|
unsigned long long total_mem;
|
|
|
|
int nr_cmdline;
|
|
int nr_sibling_cores;
|
|
int nr_sibling_threads;
|
|
int nr_numa_nodes;
|
|
int nr_pmu_mappings;
|
|
int nr_groups;
|
|
char *cmdline;
|
|
const char **cmdline_argv;
|
|
char *sibling_cores;
|
|
char *sibling_threads;
|
|
char *numa_nodes;
|
|
char *pmu_mappings;
|
|
struct cpu_topology_map *cpu;
|
|
};
|
|
|
|
extern struct perf_env perf_env;
|
|
|
|
void perf_env__exit(struct perf_env *env);
|
|
|
|
int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]);
|
|
|
|
#endif /* __PERF_ENV_H */
|