Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / perf / util / ftrace.h
blobbae649ef50e8447ab5a612e4007f4b18e640b7d4
1 #ifndef __PERF_FTRACE_H__
2 #define __PERF_FTRACE_H__
4 #include <linux/list.h>
6 #include "target.h"
8 struct evlist;
9 struct hashamp;
11 struct perf_ftrace {
12 struct evlist *evlist;
13 struct target target;
14 const char *tracer;
15 struct list_head filters;
16 struct list_head notrace;
17 struct list_head graph_funcs;
18 struct list_head nograph_funcs;
19 struct hashmap *profile_hash;
20 unsigned long percpu_buffer_size;
21 bool inherit;
22 bool use_nsec;
23 int graph_depth;
24 int func_stack_trace;
25 int func_irq_info;
26 int graph_nosleep_time;
27 int graph_noirqs;
28 int graph_verbose;
29 int graph_thresh;
30 int graph_tail;
33 struct filter_entry {
34 struct list_head list;
35 char name[];
38 #define NUM_BUCKET 22 /* 20 + 2 (for outliers in both direction) */
40 #ifdef HAVE_BPF_SKEL
42 int perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace);
43 int perf_ftrace__latency_start_bpf(struct perf_ftrace *ftrace);
44 int perf_ftrace__latency_stop_bpf(struct perf_ftrace *ftrace);
45 int perf_ftrace__latency_read_bpf(struct perf_ftrace *ftrace,
46 int buckets[]);
47 int perf_ftrace__latency_cleanup_bpf(struct perf_ftrace *ftrace);
49 #else /* !HAVE_BPF_SKEL */
51 static inline int
52 perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace __maybe_unused)
54 return -1;
57 static inline int
58 perf_ftrace__latency_start_bpf(struct perf_ftrace *ftrace __maybe_unused)
60 return -1;
63 static inline int
64 perf_ftrace__latency_stop_bpf(struct perf_ftrace *ftrace __maybe_unused)
66 return -1;
69 static inline int
70 perf_ftrace__latency_read_bpf(struct perf_ftrace *ftrace __maybe_unused,
71 int buckets[] __maybe_unused)
73 return -1;
76 static inline int
77 perf_ftrace__latency_cleanup_bpf(struct perf_ftrace *ftrace __maybe_unused)
79 return -1;
82 #endif /* HAVE_BPF_SKEL */
84 #endif /* __PERF_FTRACE_H__ */