xref: /openbmc/linux/tools/perf/util/off_cpu.h (revision 685439a7)
1edc41a10SNamhyung Kim #ifndef PERF_UTIL_OFF_CPU_H
2edc41a10SNamhyung Kim #define PERF_UTIL_OFF_CPU_H
3edc41a10SNamhyung Kim 
4edc41a10SNamhyung Kim struct evlist;
510742d0cSNamhyung Kim struct target;
6edc41a10SNamhyung Kim struct perf_session;
7*685439a7SNamhyung Kim struct record_opts;
8edc41a10SNamhyung Kim 
9edc41a10SNamhyung Kim #define OFFCPU_EVENT  "offcpu-time"
10edc41a10SNamhyung Kim 
11edc41a10SNamhyung Kim #ifdef HAVE_BPF_SKEL
12*685439a7SNamhyung Kim int off_cpu_prepare(struct evlist *evlist, struct target *target,
13*685439a7SNamhyung Kim 		    struct record_opts *opts);
14edc41a10SNamhyung Kim int off_cpu_write(struct perf_session *session);
15edc41a10SNamhyung Kim #else
1610742d0cSNamhyung Kim static inline int off_cpu_prepare(struct evlist *evlist __maybe_unused,
17*685439a7SNamhyung Kim 				  struct target *target __maybe_unused,
18*685439a7SNamhyung Kim 				  struct record_opts *opts __maybe_unused)
19edc41a10SNamhyung Kim {
20edc41a10SNamhyung Kim 	return -1;
21edc41a10SNamhyung Kim }
22edc41a10SNamhyung Kim 
23edc41a10SNamhyung Kim static inline int off_cpu_write(struct perf_session *session __maybe_unused)
24edc41a10SNamhyung Kim {
25edc41a10SNamhyung Kim 	return -1;
26edc41a10SNamhyung Kim }
27edc41a10SNamhyung Kim #endif
28edc41a10SNamhyung Kim 
29edc41a10SNamhyung Kim #endif  /* PERF_UTIL_OFF_CPU_H */
30