1 #ifndef PERF_UTIL_OFF_CPU_H 2 #define PERF_UTIL_OFF_CPU_H 3 4 struct evlist; 5 struct target; 6 struct perf_session; 7 struct record_opts; 8 9 #define OFFCPU_EVENT "offcpu-time" 10 11 #ifdef HAVE_BPF_SKEL 12 int off_cpu_prepare(struct evlist *evlist, struct target *target, 13 struct record_opts *opts); 14 int off_cpu_write(struct perf_session *session); 15 #else 16 static inline int off_cpu_prepare(struct evlist *evlist __maybe_unused, 17 struct target *target __maybe_unused, 18 struct record_opts *opts __maybe_unused) 19 { 20 return -1; 21 } 22 23 static inline int off_cpu_write(struct perf_session *session __maybe_unused) 24 { 25 return -1; 26 } 27 #endif 28 29 #endif /* PERF_UTIL_OFF_CPU_H */ 30