f7d74ce32f
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 <yao.jin@linux.intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jin Yao <yao.jin@intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210514122948.9472-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
34 lines
754 B
C
34 lines
754 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __PMU_HYBRID_H
|
|
#define __PMU_HYBRID_H
|
|
|
|
#include <linux/perf_event.h>
|
|
#include <linux/compiler.h>
|
|
#include <linux/list.h>
|
|
#include <stdbool.h>
|
|
#include "pmu.h"
|
|
|
|
extern struct list_head perf_pmu__hybrid_pmus;
|
|
|
|
#define perf_pmu__for_each_hybrid_pmu(pmu) \
|
|
list_for_each_entry(pmu, &perf_pmu__hybrid_pmus, hybrid_list)
|
|
|
|
bool perf_pmu__hybrid_mounted(const char *name);
|
|
|
|
struct perf_pmu *perf_pmu__find_hybrid_pmu(const char *name);
|
|
bool perf_pmu__is_hybrid(const char *name);
|
|
char *perf_pmu__hybrid_type_to_pmu(const char *type);
|
|
|
|
static inline int perf_pmu__hybrid_pmu_num(void)
|
|
{
|
|
struct perf_pmu *pmu;
|
|
int num = 0;
|
|
|
|
perf_pmu__for_each_hybrid_pmu(pmu)
|
|
num++;
|
|
|
|
return num;
|
|
}
|
|
|
|
#endif /* __PMU_HYBRID_H */
|