lttv_hooks_add_list(tc->before, before_trace);
lttv_hooks_add_list(tc->after, after_trace);
nb_control = ltt_trace_control_tracefile_number(tc->t);
- nb_per_cpu = ltt_trace_control_tracefile_number(tc->t);
+ nb_per_cpu = ltt_trace_per_cpu_tracefile_number(tc->t);
nb_tracefile = nb_control + nb_per_cpu;
for(j = 0 ; j < nb_tracefile ; j++) {
tfc = tc->control_tracefiles[j];
}
else {
- tfc = tc->per_cpu_tracefiles[j];
+ tfc = tc->per_cpu_tracefiles[j-nb_control];
}
lttv_hooks_add_list(tfc->check, check_tracefile);
lttv_hooks_add_list(tfc->before, before_tracefile);
lttv_hooks_remove_list(tc->before, before_trace);
lttv_hooks_remove_list(tc->after, after_trace);
nb_control = ltt_trace_control_tracefile_number(tc->t);
- nb_per_cpu = ltt_trace_control_tracefile_number(tc->t);
+ nb_per_cpu = ltt_trace_per_cpu_tracefile_number(tc->t);
nb_tracefile = nb_control + nb_per_cpu;
for(j = 0 ; j < nb_tracefile ; j++) {
tfc = tc->control_tracefiles[j];
}
else {
- tfc = tc->per_cpu_tracefiles[j];
+ tfc = tc->per_cpu_tracefiles[j-nb_control];
}
lttv_hooks_remove_list(tfc->check, check_tracefile);
lttv_hooks_remove_list(tfc->before, before_tracefile);