mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 02:54:05 +00:00
It is useful to let the user know about the hybrid topology. Add the HYBRID_TOPOLOGY feature in header to indicate the core CPUs and the atom CPUs. With this patch a perf.data generated on a hybrid platform reports the hybrid CPU list: root@otcpl-adl-s-2:~# perf report --header-only -I ... # hybrid cpu system: # cpu_core cpu list : 0-15 # cpu_atom cpu list : 16-23 For a perf.data generated on a non-hybrid platform, reports a message that HYBRID_TOPOLOGY is missing: root@kbl-ppc:~# perf report --header-only -I ... # missing features: TRACING_DATA BRANCH_STACK GROUP_DESC AUXTRACE STAT CLOCKID DIR_FORMAT COMPRESSED CLOCK_DATA HYBRID_TOPOLOGY Signed-off-by: Jin Yao <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jin Yao <[email protected]> Cc: Kan Liang <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
48 lines
921 B
C
48 lines
921 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __PERF_CPUTOPO_H
|
|
#define __PERF_CPUTOPO_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct cpu_topology {
|
|
u32 core_sib;
|
|
u32 die_sib;
|
|
u32 thread_sib;
|
|
char **core_siblings;
|
|
char **die_siblings;
|
|
char **thread_siblings;
|
|
};
|
|
|
|
struct numa_topology_node {
|
|
char *cpus;
|
|
u32 node;
|
|
u64 mem_total;
|
|
u64 mem_free;
|
|
};
|
|
|
|
struct numa_topology {
|
|
u32 nr;
|
|
struct numa_topology_node nodes[];
|
|
};
|
|
|
|
struct hybrid_topology_node {
|
|
char *pmu_name;
|
|
char *cpus;
|
|
};
|
|
|
|
struct hybrid_topology {
|
|
u32 nr;
|
|
struct hybrid_topology_node nodes[];
|
|
};
|
|
|
|
struct cpu_topology *cpu_topology__new(void);
|
|
void cpu_topology__delete(struct cpu_topology *tp);
|
|
|
|
struct numa_topology *numa_topology__new(void);
|
|
void numa_topology__delete(struct numa_topology *tp);
|
|
|
|
struct hybrid_topology *hybrid_topology__new(void);
|
|
void hybrid_topology__delete(struct hybrid_topology *tp);
|
|
|
|
#endif /* __PERF_CPUTOPO_H */
|