4 void lttv_analyse_init() {
9 void lttv_analyse_destroy() {
14 void lttv_analyse_trace_set(lttv_trace_set
*s
) {
16 lttv_hooks
*before
, *after
;
19 a
= lttv_trace_set_attributes(s
);
20 before
= (lttv_hooks
*)lttv_attributes_get_pointer_pathname(a
,"hooks/before");
21 after
= (lttv_hooks
*)lttv_attributes_get_pointer_pathname(a
,"hooks/after");
22 nb
= lttv_trace_set_number(s
);
24 lttv_hooks_call(before
, s
);
25 for(i
= 0; i
< nb
; i
++) {
26 lttv_analyse_trace(lttv_trace_set_get(s
,i
));
28 lttv_hooks_call(after
, s
);
32 void lttv_analyse_trace(lttv_trace
*t
) {
33 int i
, nb_all_cpu
, nb_per_cpu
;
34 lttv_hooks
*before
, *after
;
37 a
= lttv_trace_attributes(t
);
38 before
= (lttv_hooks
*)lttv_attributes_get_pointer_pathname(a
,"hooks/before");
39 after
= (lttv_hooks
*)lttv_attributes_get_pointer_pathname(a
,"hooks/after");
41 nb_all_cpu
= lttv_trace_tracefile_number_all_cpu(t
);
42 nb_per_cpu
= lttv_trace_tracefile_number_per_cpu(t
);
44 lttv_hooks_call(before
, t
);
46 for(i
= 0; i
< nb_all_cpu
; i
++) {
47 lttv_analyse_tracefile(lttv_trace_get_all_cpu(t
,i
));
50 for(i
= 0; i
< nb_per_cpu
; i
++) {
51 lttv_analyse_tracefile(lttv_trace_get_per_cpu(t
,i
));
54 lttv_hooks_call(after
, t
);
58 void lttv_analyse_tracefile(lttv_tracefile
*t
) {
62 lttv_hooks
*before
, *after
, *event_hooks
;
63 lttv_hooks_by_id
*event_hooks_by_id
;
66 a
= lttv_tracefile_attributes(t
);
67 before
= (lttv_hooks
*)lttv_attributes_get_pointer_pathname(a
,"hooks/before");
68 after
= (lttv_hooks
*)lttv_attributes_get_pointer_pathname(a
,"hooks/after");
69 event_hooks
= (lttv_hooks
*)lttv_attributes_get_pointer_pathname(a
,
71 event_hooks_by_id
= (lttv_hooks_by_id
*)
72 lttv_attributes_get_pointer_pathname(a
, "hooks/eventid");
74 tf
= lttv_tracefile_ltt_tracefile(t
);
76 lttv_hooks_call(before
, t
);
78 if(lttv_hooks_number(hooks_event
) != 0 ||
79 lttv_hooks_by_id_number(event_hook_by_id
) != 0){
80 while(event
= ltt_tracefile_read(tf
) != NULL
) {
81 lttv_hooks_call(event_hooks
,event
);
82 lttv_hooks_by_id_call(event_hooks_by_id
,event
,ltt_event_type_id(event
));
86 lttv_hooks_call(after
, t
);
This page took 0.030565 seconds and 4 git commands to generate.