| 1 | #ifndef TRACESET_H |
| 2 | #define TRACESET_H |
| 3 | |
| 4 | #include <lttv/attribute.h> |
| 5 | #include <lttv/hook.h> |
| 6 | #include <ltt/ltt.h> |
| 7 | |
| 8 | /* A traceSet is a set of traces to be analyzed together. */ |
| 9 | |
| 10 | typedef struct _lttv_trace_set lttv_trace_set; |
| 11 | |
| 12 | |
| 13 | /* Trace sets may be added to, removed from and their content listed. */ |
| 14 | |
| 15 | lttv_trace_set *lttv_trace_set_new(); |
| 16 | |
| 17 | lttv_trace_set *lttv_trace_set_destroy(lttv_trace_set *s); |
| 18 | |
| 19 | void lttv_trace_set_add(lttv_trace_set *s, ltt_trace *t); |
| 20 | |
| 21 | unsigned lttv_trace_set_number(lttv_trace_set *s); |
| 22 | |
| 23 | ltt_trace *lttv_trace_set_get(lttv_trace_set *s, unsigned i); |
| 24 | |
| 25 | ltt_trace *lttv_trace_set_remove(lttv_trace_set *s, unsigned i); |
| 26 | |
| 27 | |
| 28 | /* An attributes table is attached to the set and to each trace in the set. */ |
| 29 | |
| 30 | lttv_attributes *lttv_trace_set_attributes(lttv_trace_set *s); |
| 31 | |
| 32 | lttv_attributes *lttv_trace_set_trace_attributes(lttv_trace_set *s, |
| 33 | unsigned i); |
| 34 | |
| 35 | |
| 36 | /* Process the events in a trace set. Lists of hooks are provided to be |
| 37 | called before and after the trace set and each trace and tracefile. |
| 38 | For each event, a trace set filter function is called to verify if the |
| 39 | event is of interest (if it returns TRUE). If this is the case, hooks |
| 40 | are called for the event, as well as type specific hooks if applicable. |
| 41 | Any of the hooks lists and the filter may be null if not to be used. */ |
| 42 | |
| 43 | lttv_trace_set_process(lttv_trace_set *s, |
| 44 | lttv_hooks *before_trace_set, lttv_hooks *after_trace_set, |
| 45 | char *filter, ltt_time start, ltt_time end); |
| 46 | |
| 47 | #endif // TRACESET_H |
| 48 | |