1#ifndef __PERF_TOOL_H 2#define __PERF_TOOL_H 3 4#include <stdbool.h> 5 6struct perf_session; 7union perf_event; 8struct perf_evlist; 9struct perf_evsel; 10struct perf_sample; 11struct perf_tool; 12struct machine; 13struct ordered_events; 14 15typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event, 16 struct perf_sample *sample, 17 struct perf_evsel *evsel, struct machine *machine); 18 19typedef int (*event_op)(struct perf_tool *tool, union perf_event *event, 20 struct perf_sample *sample, struct machine *machine); 21 22typedef int (*event_attr_op)(struct perf_tool *tool, 23 union perf_event *event, 24 struct perf_evlist **pevlist); 25 26typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event, 27 struct perf_session *session); 28 29typedef int (*event_oe)(struct perf_tool *tool, union perf_event *event, 30 struct ordered_events *oe); 31 32struct perf_tool { 33 event_sample sample, 34 read; 35 event_op mmap, 36 mmap2, 37 comm, 38 fork, 39 exit, 40 lost, 41 throttle, 42 unthrottle; 43 event_attr_op attr; 44 event_op2 tracing_data; 45 event_oe finished_round; 46 event_op2 build_id, 47 id_index; 48 bool ordered_events; 49 bool ordering_requires_timestamps; 50}; 51 52#endif /* __PERF_TOOL_H */ 53