Lines Matching defs:event
36 * last event might point to some random place in the list as it's
37 * the last queued event. We expect that the new event is close to
65 union perf_event *event)
70 new_event = memdup(event, event->header.size);
72 oe->cur_alloc_size += event->header.size;
79 union perf_event *event)
81 return oe->copy_on_queue ? __dup_event(oe, event) : event;
84 static void __free_dup_event(struct ordered_events *oe, union perf_event *event)
86 if (event) {
87 oe->cur_alloc_size -= event->header.size;
88 free(event);
92 static void free_dup_event(struct ordered_events *oe, union perf_event *event)
95 __free_dup_event(oe, event);
100 union perf_event *event)
107 new_event = dup_event(oe, event);
113 * event allocation:
120 * buffer -> event[0]
121 * event[1]
124 * Each allocated ordered event is linked to one of
129 * Allocation of the ordered event uses the following order
135 * Removal of ordered event object moves it from events to
144 new = &oe->buffer->event[oe->buffer_idx];
161 new = &oe->buffer->event[0];
167 new->event = new_event;
173 union perf_event *event)
177 new = alloc_event(oe, event);
186 void ordered_events__delete(struct ordered_events *oe, struct ordered_event *event)
188 list_move(&event->list, &oe->cache);
190 free_dup_event(oe, event->event);
191 event->event = NULL;
194 int ordered_events__queue(struct ordered_events *oe, union perf_event *event,
203 pr_oe_time(timestamp, "out of order event\n");
210 oevent = ordered_events__new_event(oe, timestamp, event);
213 oevent = ordered_events__new_event(oe, timestamp, event);
299 /* Warn if we are called before any event got allocated. */
351 struct ordered_event *event;
356 event = list_first_entry(&oe->events, struct ordered_event, list);
357 return event->timestamp;
380 __free_dup_event(oe, buffer->event[i].event);