cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

pmu-hybrid.h (754B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef __PMU_HYBRID_H
      3#define __PMU_HYBRID_H
      4
      5#include <linux/perf_event.h>
      6#include <linux/compiler.h>
      7#include <linux/list.h>
      8#include <stdbool.h>
      9#include "pmu.h"
     10
     11extern struct list_head perf_pmu__hybrid_pmus;
     12
     13#define perf_pmu__for_each_hybrid_pmu(pmu)	\
     14	list_for_each_entry(pmu, &perf_pmu__hybrid_pmus, hybrid_list)
     15
     16bool perf_pmu__hybrid_mounted(const char *name);
     17
     18struct perf_pmu *perf_pmu__find_hybrid_pmu(const char *name);
     19bool perf_pmu__is_hybrid(const char *name);
     20char *perf_pmu__hybrid_type_to_pmu(const char *type);
     21
     22static inline int perf_pmu__hybrid_pmu_num(void)
     23{
     24	struct perf_pmu *pmu;
     25	int num = 0;
     26
     27	perf_pmu__for_each_hybrid_pmu(pmu)
     28		num++;
     29
     30	return num;
     31}
     32
     33#endif /* __PMU_HYBRID_H */