Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / perf / util / off_cpu.h
blob2dd67c60f21196ff286730ee8659f8a0c09e6aac
1 #ifndef PERF_UTIL_OFF_CPU_H
2 #define PERF_UTIL_OFF_CPU_H
4 #include <linux/perf_event.h>
6 struct evlist;
7 struct target;
8 struct perf_session;
9 struct record_opts;
11 #define OFFCPU_EVENT "offcpu-time"
13 #define OFFCPU_SAMPLE_TYPES (PERF_SAMPLE_IDENTIFIER | PERF_SAMPLE_IP | \
14 PERF_SAMPLE_TID | PERF_SAMPLE_TIME | \
15 PERF_SAMPLE_ID | PERF_SAMPLE_CPU | \
16 PERF_SAMPLE_PERIOD | PERF_SAMPLE_CALLCHAIN | \
17 PERF_SAMPLE_CGROUP)
20 #ifdef HAVE_BPF_SKEL
21 int off_cpu_prepare(struct evlist *evlist, struct target *target,
22 struct record_opts *opts);
23 int off_cpu_write(struct perf_session *session);
24 #else
25 static inline int off_cpu_prepare(struct evlist *evlist __maybe_unused,
26 struct target *target __maybe_unused,
27 struct record_opts *opts __maybe_unused)
29 return -1;
32 static inline int off_cpu_write(struct perf_session *session __maybe_unused)
34 return -1;
36 #endif
38 #endif /* PERF_UTIL_OFF_CPU_H */