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