170943490SStephane Eranian /* SPDX-License-Identifier: GPL-2.0 */ 270943490SStephane Eranian /* 370943490SStephane Eranian * Support for libpfm4 event encoding. 470943490SStephane Eranian * 570943490SStephane Eranian * Copyright 2020 Google LLC. 670943490SStephane Eranian */ 770943490SStephane Eranian #ifndef __PERF_PFM_H 870943490SStephane Eranian #define __PERF_PFM_H 970943490SStephane Eranian 10*be3392b6SIan Rogers #include "print-events.h" 1170943490SStephane Eranian #include <subcmd/parse-options.h> 1270943490SStephane Eranian 1370943490SStephane Eranian #ifdef HAVE_LIBPFM 1470943490SStephane Eranian int parse_libpfm_events_option(const struct option *opt, const char *str, 1570943490SStephane Eranian int unset); 1670943490SStephane Eranian 17*be3392b6SIan Rogers void print_libpfm_events(const struct print_callbacks *print_cb, void *print_state); 1870943490SStephane Eranian 1970943490SStephane Eranian #else 2070943490SStephane Eranian #include <linux/compiler.h> 2170943490SStephane Eranian parse_libpfm_events_option(const struct option * opt __maybe_unused,const char * str __maybe_unused,int unset __maybe_unused)2270943490SStephane Eranianstatic inline int parse_libpfm_events_option( 2370943490SStephane Eranian const struct option *opt __maybe_unused, 2470943490SStephane Eranian const char *str __maybe_unused, 2570943490SStephane Eranian int unset __maybe_unused) 2670943490SStephane Eranian { 2770943490SStephane Eranian return 0; 2870943490SStephane Eranian } 2970943490SStephane Eranian print_libpfm_events(const struct print_callbacks * print_cb __maybe_unused,void * print_state __maybe_unused)30*be3392b6SIan Rogersstatic inline void print_libpfm_events(const struct print_callbacks *print_cb __maybe_unused, 31*be3392b6SIan Rogers void *print_state __maybe_unused) 3270943490SStephane Eranian { 3370943490SStephane Eranian } 3470943490SStephane Eranian 3570943490SStephane Eranian #endif 3670943490SStephane Eranian 3770943490SStephane Eranian 3870943490SStephane Eranian #endif /* __PERF_PFM_H */ 39