xref: /OK3568_Linux_fs/kernel/tools/perf/util/pfm.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Support for libpfm4 event encoding.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright 2020 Google LLC.
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun #ifndef __PERF_PFM_H
8*4882a593Smuzhiyun #define __PERF_PFM_H
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #include <subcmd/parse-options.h>
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #ifdef HAVE_LIBPFM
13*4882a593Smuzhiyun int parse_libpfm_events_option(const struct option *opt, const char *str,
14*4882a593Smuzhiyun 			int unset);
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun void print_libpfm_events(bool name_only, bool long_desc);
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun #else
19*4882a593Smuzhiyun #include <linux/compiler.h>
20*4882a593Smuzhiyun 
parse_libpfm_events_option(const struct option * opt __maybe_unused,const char * str __maybe_unused,int unset __maybe_unused)21*4882a593Smuzhiyun static inline int parse_libpfm_events_option(
22*4882a593Smuzhiyun 	const struct option *opt __maybe_unused,
23*4882a593Smuzhiyun 	const char *str __maybe_unused,
24*4882a593Smuzhiyun 	int unset __maybe_unused)
25*4882a593Smuzhiyun {
26*4882a593Smuzhiyun 	return 0;
27*4882a593Smuzhiyun }
28*4882a593Smuzhiyun 
print_libpfm_events(bool name_only __maybe_unused,bool long_desc __maybe_unused)29*4882a593Smuzhiyun static inline void print_libpfm_events(bool name_only __maybe_unused,
30*4882a593Smuzhiyun 				       bool long_desc __maybe_unused)
31*4882a593Smuzhiyun {
32*4882a593Smuzhiyun }
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun #endif
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun 
37*4882a593Smuzhiyun #endif /* __PERF_PFM_H */
38