Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / tools / perf / util / cputopo.h
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       thread_sib;
11         char    **core_siblings;
12         char    **thread_siblings;
13 };
14
15 struct numa_topology_node {
16         char            *cpus;
17         u32              node;
18         u64              mem_total;
19         u64              mem_free;
20 };
21
22 struct numa_topology {
23         u32                             nr;
24         struct numa_topology_node       nodes[0];
25 };
26
27 struct cpu_topology *cpu_topology__new(void);
28 void cpu_topology__delete(struct cpu_topology *tp);
29
30 struct numa_topology *numa_topology__new(void);
31 void numa_topology__delete(struct numa_topology *tp);
32
33 #endif /* __PERF_CPUTOPO_H */