git-svn-id: http://ltt.polymtl.ca/svn@204 04897980-b3bd-0310-b5e0-8ef037075253
[lttv.git] / ltt / branches / poly / lttv / processTrace.c
index 646dd1c820b1f553c09eaaf5e0476a26a21b2362..550b9c4295d694bda999f5bde4ea8d4ef2b0b7d8 100644 (file)
@@ -33,7 +33,7 @@ lttv_context_new_trace_context(LttvTracesetContext *self)
 LttvTracefileContext *
 lttv_context_new_tracefile_context(LttvTracesetContext *self)
 {
-  LTTV_TRACESET_CONTEXT_GET_CLASS(self)->new_tracefile_context(self);
+  return LTTV_TRACESET_CONTEXT_GET_CLASS(self)->new_tracefile_context(self);
 }
 
 
@@ -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);
@@ -257,21 +257,21 @@ void lttv_traceset_context_remove_hooks(LttvTracesetContext *self,
 }
 
 
-LttvTracesetContext *
+static LttvTracesetContext *
 new_traceset_context(LttvTracesetContext *self)
 {
   return g_object_new(LTTV_TRACESET_CONTEXT_TYPE, NULL);
 }
 
 
-LttvTraceContext * 
+static LttvTraceContext * 
 new_trace_context(LttvTracesetContext *self)
 {
   return g_object_new(LTTV_TRACE_CONTEXT_TYPE, NULL);
 }
 
 
-LttvTracefileContext *
+static LttvTracefileContext *
 new_tracefile_context(LttvTracesetContext *self)
 {
   return g_object_new(LTTV_TRACEFILE_CONTEXT_TYPE, NULL);
@@ -365,7 +365,7 @@ lttv_trace_context_get_type(void)
       (GClassInitFunc) trace_context_class_init,   /* class_init */
       NULL,   /* class_finalize */
       NULL,   /* class_data */
-      sizeof (LttvTracesetContext),
+      sizeof (LttvTraceContext),
       0,      /* n_preallocs */
       (GInstanceInitFunc) trace_context_instance_init    /* instance_init */
     };
@@ -466,7 +466,8 @@ void lttv_process_trace(LttTime start, LttTime end, LttvTraceset *traceset,
      read one event and insert in the pqueue based on the event time. */
 
   lttv_hooks_call(context->before, context);
-  nbi = ltt_trace_set_number(traceset);
+  nbi = lttv_traceset_number(traceset);
+  //  nbi = ltt_trace_set_number(traceset);
 
   for(i = 0 ; i < nbi ; i++) {
     tc = context->traces[i];
@@ -524,7 +525,7 @@ void lttv_process_trace(LttTime start, LttTime end, LttvTraceset *traceset,
     g_tree_remove(pqueue, &(tfc->timestamp));
 
     if(!lttv_hooks_call(tfc->check_event, context)) {
-      id = lttv_event_id(tfc->e);
+      id = ltt_event_eventtype_id(tfc->e);
       lttv_hooks_call(tfc->before_event, tfc);
       lttv_hooks_call(lttv_hooks_by_id_get(tfc->before_event_by_id, id), tfc);
       lttv_hooks_call(tfc->after_event, context);
This page took 0.026921 seconds and 4 git commands to generate.