Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
45694aa7 ACM |
2 | #ifndef __PERF_TOOL_H |
3 | #define __PERF_TOOL_H | |
4 | ||
ee29be62 ACM |
5 | #include <stdbool.h> |
6 | ||
a16ac023 AH |
7 | #include <linux/types.h> |
8 | ||
45694aa7 | 9 | struct perf_session; |
ee29be62 ACM |
10 | union perf_event; |
11 | struct perf_evlist; | |
32dcd021 | 12 | struct evsel; |
ee29be62 | 13 | struct perf_sample; |
45694aa7 ACM |
14 | struct perf_tool; |
15 | struct machine; | |
d704ebda | 16 | struct ordered_events; |
45694aa7 ACM |
17 | |
18 | typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event, | |
19 | struct perf_sample *sample, | |
32dcd021 | 20 | struct evsel *evsel, struct machine *machine); |
45694aa7 ACM |
21 | |
22 | typedef int (*event_op)(struct perf_tool *tool, union perf_event *event, | |
23 | struct perf_sample *sample, struct machine *machine); | |
24 | ||
47c3d109 AH |
25 | typedef int (*event_attr_op)(struct perf_tool *tool, |
26 | union perf_event *event, | |
45694aa7 | 27 | struct perf_evlist **pevlist); |
45694aa7 | 28 | |
89f1688a | 29 | typedef int (*event_op2)(struct perf_session *session, union perf_event *event); |
7336555a | 30 | typedef s64 (*event_op3)(struct perf_session *session, union perf_event *event); |
61a7773c | 31 | typedef int (*event_op4)(struct perf_session *session, union perf_event *event, u64 data); |
45694aa7 | 32 | |
d704ebda ACM |
33 | typedef int (*event_oe)(struct perf_tool *tool, union perf_event *event, |
34 | struct ordered_events *oe); | |
35 | ||
114f709e DCC |
36 | enum show_feature_header { |
37 | SHOW_FEAT_NO_HEADER = 0, | |
38 | SHOW_FEAT_HEADER, | |
39 | SHOW_FEAT_HEADER_FULL_INFO, | |
40 | }; | |
41 | ||
45694aa7 ACM |
42 | struct perf_tool { |
43 | event_sample sample, | |
44 | read; | |
45 | event_op mmap, | |
5c5e854b | 46 | mmap2, |
45694aa7 | 47 | comm, |
f3b3614a | 48 | namespaces, |
45694aa7 ACM |
49 | fork, |
50 | exit, | |
51 | lost, | |
c4937a91 | 52 | lost_samples, |
4a96f7a0 | 53 | aux, |
0ad21f68 | 54 | itrace_start, |
0286039f | 55 | context_switch, |
45694aa7 | 56 | throttle, |
9aa0bfa3 | 57 | unthrottle, |
45178a92 SL |
58 | ksymbol, |
59 | bpf_event; | |
9aa0bfa3 | 60 | |
45694aa7 | 61 | event_attr_op attr; |
ffe77725 | 62 | event_attr_op event_update; |
47c3d109 | 63 | event_op2 tracing_data; |
d704ebda ACM |
64 | event_oe finished_round; |
65 | event_op2 build_id, | |
a16ac023 | 66 | id_index, |
e9bf54d2 | 67 | auxtrace_info, |
5f3339d2 | 68 | auxtrace_error, |
46bc29b9 | 69 | time_conv, |
6640b6c2 | 70 | thread_map, |
374fb9e3 | 71 | cpu_map, |
d80518c9 | 72 | stat_config, |
2d8f0f18 | 73 | stat, |
e9def1b2 DCC |
74 | stat_round, |
75 | feature; | |
61a7773c | 76 | event_op4 compressed; |
a16ac023 | 77 | event_op3 auxtrace; |
0a8cb85c | 78 | bool ordered_events; |
45694aa7 | 79 | bool ordering_requires_timestamps; |
f3b3614a | 80 | bool namespace_events; |
075ca1eb | 81 | bool no_warn; |
114f709e | 82 | enum show_feature_header show_feat_hdr; |
45694aa7 ACM |
83 | }; |
84 | ||
85 | #endif /* __PERF_TOOL_H */ |