2019-02-19 09:58:13 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __PERF_CPUTOPO_H
|
|
|
|
#define __PERF_CPUTOPO_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
struct cpu_topology {
|
|
|
|
u32 core_sib;
|
2019-06-04 22:50:41 +00:00
|
|
|
u32 die_sib;
|
2019-02-19 09:58:13 +00:00
|
|
|
u32 thread_sib;
|
|
|
|
char **core_siblings;
|
2019-06-04 22:50:41 +00:00
|
|
|
char **die_siblings;
|
2019-02-19 09:58:13 +00:00
|
|
|
char **thread_siblings;
|
|
|
|
};
|
|
|
|
|
2019-02-19 09:58:14 +00:00
|
|
|
struct numa_topology_node {
|
|
|
|
char *cpus;
|
|
|
|
u32 node;
|
|
|
|
u64 mem_total;
|
|
|
|
u64 mem_free;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct numa_topology {
|
|
|
|
u32 nr;
|
2020-05-15 17:29:26 +00:00
|
|
|
struct numa_topology_node nodes[];
|
2019-02-19 09:58:14 +00:00
|
|
|
};
|
|
|
|
|
2019-02-19 09:58:13 +00:00
|
|
|
struct cpu_topology *cpu_topology__new(void);
|
|
|
|
void cpu_topology__delete(struct cpu_topology *tp);
|
|
|
|
|
2019-02-19 09:58:14 +00:00
|
|
|
struct numa_topology *numa_topology__new(void);
|
|
|
|
void numa_topology__delete(struct numa_topology *tp);
|
|
|
|
|
2019-02-19 09:58:13 +00:00
|
|
|
#endif /* __PERF_CPUTOPO_H */
|