1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __PERF_CPUTOPO_H 3 #define __PERF_CPUTOPO_H 4 5 #include <linux/types.h> 6 #include "env.h" 7 8 struct cpu_topology { 9 u32 core_sib; 10 u32 die_sib; 11 u32 thread_sib; 12 char **core_siblings; 13 char **die_siblings; 14 char **thread_siblings; 15 }; 16 17 struct numa_topology_node { 18 char *cpus; 19 u32 node; 20 u64 mem_total; 21 u64 mem_free; 22 }; 23 24 struct numa_topology { 25 u32 nr; 26 struct numa_topology_node nodes[0]; 27 }; 28 29 struct cpu_topology *cpu_topology__new(void); 30 void cpu_topology__delete(struct cpu_topology *tp); 31 32 struct numa_topology *numa_topology__new(void); 33 void numa_topology__delete(struct numa_topology *tp); 34 35 #endif /* __PERF_CPUTOPO_H */ 36