0001
0002 #ifndef __PERF_TOOL_H
0003 #define __PERF_TOOL_H
0004
0005 #include <stdbool.h>
0006
0007 #include <linux/types.h>
0008
0009 struct perf_session;
0010 union perf_event;
0011 struct evlist;
0012 struct evsel;
0013 struct perf_sample;
0014 struct perf_tool;
0015 struct machine;
0016 struct ordered_events;
0017
0018 typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event,
0019 struct perf_sample *sample,
0020 struct evsel *evsel, struct machine *machine);
0021
0022 typedef int (*event_op)(struct perf_tool *tool, union perf_event *event,
0023 struct perf_sample *sample, struct machine *machine);
0024
0025 typedef int (*event_attr_op)(struct perf_tool *tool,
0026 union perf_event *event,
0027 struct evlist **pevlist);
0028
0029 typedef int (*event_op2)(struct perf_session *session, union perf_event *event);
0030 typedef s64 (*event_op3)(struct perf_session *session, union perf_event *event);
0031 typedef int (*event_op4)(struct perf_session *session, union perf_event *event, u64 data,
0032 const char *str);
0033
0034 typedef int (*event_oe)(struct perf_tool *tool, union perf_event *event,
0035 struct ordered_events *oe);
0036
0037 enum show_feature_header {
0038 SHOW_FEAT_NO_HEADER = 0,
0039 SHOW_FEAT_HEADER,
0040 SHOW_FEAT_HEADER_FULL_INFO,
0041 };
0042
0043 struct perf_tool {
0044 event_sample sample,
0045 read;
0046 event_op mmap,
0047 mmap2,
0048 comm,
0049 namespaces,
0050 cgroup,
0051 fork,
0052 exit,
0053 lost,
0054 lost_samples,
0055 aux,
0056 itrace_start,
0057 aux_output_hw_id,
0058 context_switch,
0059 throttle,
0060 unthrottle,
0061 ksymbol,
0062 bpf,
0063 text_poke;
0064
0065 event_attr_op attr;
0066 event_attr_op event_update;
0067 event_op2 tracing_data;
0068 event_oe finished_round;
0069 event_op2 build_id,
0070 id_index,
0071 auxtrace_info,
0072 auxtrace_error,
0073 time_conv,
0074 thread_map,
0075 cpu_map,
0076 stat_config,
0077 stat,
0078 stat_round,
0079 feature,
0080 finished_init;
0081 event_op4 compressed;
0082 event_op3 auxtrace;
0083 bool ordered_events;
0084 bool ordering_requires_timestamps;
0085 bool namespace_events;
0086 bool cgroup_events;
0087 bool no_warn;
0088 enum show_feature_header show_feat_hdr;
0089 };
0090
0091 #endif