1 #ifndef __ORDERED_EVENTS_H
2 #define __ORDERED_EVENTS_H
4 #include <linux/types.h>
11 union perf_event *event;
12 struct list_head list;
22 struct ordered_events;
24 typedef int (*ordered_events__deliver_t)(struct ordered_events *oe,
25 struct ordered_event *event);
27 struct ordered_events {
33 struct list_head events;
34 struct list_head cache;
35 struct list_head to_free;
36 struct ordered_event *buffer;
37 struct ordered_event *last;
38 ordered_events__deliver_t deliver;
40 unsigned int nr_events;
41 enum oe_flush last_flush_type;
42 u32 nr_unordered_events;
46 int ordered_events__queue(struct ordered_events *oe, union perf_event *event,
47 struct perf_sample *sample, u64 file_offset);
48 void ordered_events__delete(struct ordered_events *oe, struct ordered_event *event);
49 int ordered_events__flush(struct ordered_events *oe, enum oe_flush how);
50 void ordered_events__init(struct ordered_events *oe, ordered_events__deliver_t deliver);
51 void ordered_events__free(struct ordered_events *oe);
54 void ordered_events__set_alloc_size(struct ordered_events *oe, u64 size)
56 oe->max_alloc_size = size;
60 void ordered_events__set_copy_on_queue(struct ordered_events *oe, bool copy)
62 oe->copy_on_queue = copy;
64 #endif /* __ORDERED_EVENTS_H */