Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __PMU_HYBRID_H
0003 #define __PMU_HYBRID_H
0004 
0005 #include <linux/perf_event.h>
0006 #include <linux/compiler.h>
0007 #include <linux/list.h>
0008 #include <stdbool.h>
0009 #include "pmu.h"
0010 
0011 extern struct list_head perf_pmu__hybrid_pmus;
0012 
0013 #define perf_pmu__for_each_hybrid_pmu(pmu)  \
0014     list_for_each_entry(pmu, &perf_pmu__hybrid_pmus, hybrid_list)
0015 
0016 bool perf_pmu__hybrid_mounted(const char *name);
0017 
0018 struct perf_pmu *perf_pmu__find_hybrid_pmu(const char *name);
0019 bool perf_pmu__is_hybrid(const char *name);
0020 char *perf_pmu__hybrid_type_to_pmu(const char *type);
0021 
0022 static inline int perf_pmu__hybrid_pmu_num(void)
0023 {
0024     struct perf_pmu *pmu;
0025     int num = 0;
0026 
0027     perf_pmu__for_each_hybrid_pmu(pmu)
0028         num++;
0029 
0030     return num;
0031 }
0032 
0033 #endif /* __PMU_HYBRID_H */