xref: /openbmc/linux/tools/perf/util/pfm.h (revision 70943490)
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 
1070943490SStephane Eranian #include <subcmd/parse-options.h>
1170943490SStephane Eranian 
1270943490SStephane Eranian #ifdef HAVE_LIBPFM
1370943490SStephane Eranian int parse_libpfm_events_option(const struct option *opt, const char *str,
1470943490SStephane Eranian 			int unset);
1570943490SStephane Eranian 
1670943490SStephane Eranian void print_libpfm_events(bool name_only, bool long_desc);
1770943490SStephane Eranian 
1870943490SStephane Eranian #else
1970943490SStephane Eranian #include <linux/compiler.h>
2070943490SStephane Eranian 
2170943490SStephane Eranian static inline int parse_libpfm_events_option(
2270943490SStephane Eranian 	const struct option *opt __maybe_unused,
2370943490SStephane Eranian 	const char *str __maybe_unused,
2470943490SStephane Eranian 	int unset __maybe_unused)
2570943490SStephane Eranian {
2670943490SStephane Eranian 	return 0;
2770943490SStephane Eranian }
2870943490SStephane Eranian 
2970943490SStephane Eranian static inline void print_libpfm_events(bool name_only __maybe_unused,
3070943490SStephane Eranian 				       bool long_desc __maybe_unused)
3170943490SStephane Eranian {
3270943490SStephane Eranian }
3370943490SStephane Eranian 
3470943490SStephane Eranian #endif
3570943490SStephane Eranian 
3670943490SStephane Eranian 
3770943490SStephane Eranian #endif /* __PERF_PFM_H */
38