0001
0002 #ifndef __PERF_CPUTOPO_H
0003 #define __PERF_CPUTOPO_H
0004
0005 #include <linux/types.h>
0006
0007 struct cpu_topology {
0008
0009 u32 package_cpus_lists;
0010
0011 u32 die_cpus_lists;
0012
0013 u32 core_cpus_lists;
0014
0015
0016
0017
0018
0019
0020 const char **package_cpus_list;
0021
0022
0023
0024
0025
0026
0027 const char **die_cpus_list;
0028
0029
0030
0031
0032
0033
0034 const char **core_cpus_list;
0035 };
0036
0037 struct numa_topology_node {
0038 char *cpus;
0039 u32 node;
0040 u64 mem_total;
0041 u64 mem_free;
0042 };
0043
0044 struct numa_topology {
0045 u32 nr;
0046 struct numa_topology_node nodes[];
0047 };
0048
0049 struct hybrid_topology_node {
0050 char *pmu_name;
0051 char *cpus;
0052 };
0053
0054 struct hybrid_topology {
0055 u32 nr;
0056 struct hybrid_topology_node nodes[];
0057 };
0058
0059 struct cpu_topology *cpu_topology__new(void);
0060 void cpu_topology__delete(struct cpu_topology *tp);
0061
0062 struct numa_topology *numa_topology__new(void);
0063 void numa_topology__delete(struct numa_topology *tp);
0064
0065 struct hybrid_topology *hybrid_topology__new(void);
0066 void hybrid_topology__delete(struct hybrid_topology *tp);
0067
0068 #endif