git-svn-id: http://ltt.polymtl.ca/svn@178 04897980-b3bd-0310-b5e0-8ef037075253
[lttv.git] / ltt / branches / poly / lttv / processTrace.c
index 8723204c70bc58d1b7afa0f9b6da33acf7558205..94b5e2d90f37685abb688f70784f7e3ddcb3389b 100644 (file)
@@ -182,7 +182,7 @@ void lttv_traceset_context_add_hooks(LttvTracesetContext *self,
     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++) {
@@ -190,7 +190,7 @@ void lttv_traceset_context_add_hooks(LttvTracesetContext *self,
         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);
@@ -236,7 +236,7 @@ void lttv_traceset_context_remove_hooks(LttvTracesetContext *self,
     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++) {
@@ -244,7 +244,7 @@ void lttv_traceset_context_remove_hooks(LttvTracesetContext *self,
         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);
This page took 0.023025 seconds and 4 git commands to generate.