2019-02-19 17:58:13 +08: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-05 06:50:41 +08:00
|
|
|
u32 die_sib;
|
2019-02-19 17:58:13 +08:00
|
|
|
u32 thread_sib;
|
|
|
|
char **core_siblings;
|
2019-06-05 06:50:41 +08:00
|
|
|
char **die_siblings;
|
2019-02-19 17:58:13 +08:00
|
|
|
char **thread_siblings;
|
|
|
|
};
|
|
|
|
|
2019-02-19 17:58:14 +08:00
|
|
|
struct numa_topology_node {
|
|
|
|
char *cpus;
|
|
|
|
u32 node;
|
|
|
|
u64 mem_total;
|
|
|
|
u64 mem_free;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct numa_topology {
|
|
|
|
u32 nr;
|
|
|
|
struct numa_topology_node nodes[0];
|
|
|
|
};
|
|
|
|
|
2019-02-19 17:58:13 +08:00
|
|
|
struct cpu_topology *cpu_topology__new(void);
|
|
|
|
void cpu_topology__delete(struct cpu_topology *tp);
|
|
|
|
|
2019-02-19 17:58:14 +08:00
|
|
|
struct numa_topology *numa_topology__new(void);
|
|
|
|
void numa_topology__delete(struct numa_topology *tp);
|
|
|
|
|
2019-02-19 17:58:13 +08:00
|
|
|
#endif /* __PERF_CPUTOPO_H */
|