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