position ok with processing
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 23 Jul 2004 23:31:19 +0000 (23:31 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 23 Jul 2004 23:31:19 +0000 (23:31 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@631 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/module.c
ltt/branches/poly/lttv/lttv/tracecontext.c
ltt/branches/poly/lttv/lttv/tracecontext.h

index 18cc24e03a2740efd21c10ebca5d8a4e7e431414..3ebd3a33e6e63f8116be71148858ce3f3896d72a 100644 (file)
@@ -189,7 +189,7 @@ static LttvLibrary *library_load(char *name, GError **error)
     module_chain = NULL;
     module_next = &module_chain;
     gm = g_module_open(pathname,0);
-    g_free(pathname);    
+    g_free(pathname);
     
     if(gm != NULL) break;
 
@@ -226,8 +226,8 @@ static LttvLibrary *library_load(char *name, GError **error)
 
 LttvLibrary *lttv_library_load(char *name, GError **error)
 {
-  LttvLibrary *l = library_load(name, error); 
-  l->info.load_count++;
+  LttvLibrary *l = library_load(name, error);
+  if(l != NULL) l->info.load_count++;
   return l;
 }
 
index 406431261da4f8f14c929f6e71fa97ad9ed8ee39..bdd3bdc752e6e1a3a04094ffa2af1c07167321e0 100644 (file)
@@ -576,6 +576,44 @@ gboolean get_first(gpointer key, gpointer value, gpointer user_data) {
 }
 
 
+/* Put all the tracefiles at the tracefile context position */
+void lttv_process_traceset_synchronize_tracefiles(LttvTracesetContext *self)
+{
+  guint iter_trace, nb_trace;
+
+  LttvTraceContext *tc;
+
+  nb_trace = lttv_traceset_number(self->ts);
+  
+  for(iter_trace = 0 ; iter_trace < nb_trace ; iter_trace++) {
+    tc = self->traces[iter_trace];
+    {
+      /* each trace */
+      guint iter_tf, nb_tracefile;
+
+      LttvTracefileContext *tfc;
+
+      nb_tracefile = ltt_trace_control_tracefile_number(tc->t) +
+          ltt_trace_per_cpu_tracefile_number(tc->t);
+
+      for(iter_tf = 0 ; iter_tf < nb_tracefile ; iter_tf++) {
+        tfc = tc->tracefiles[iter_tf];
+        {
+          /* each tracefile */
+          //ltt_tracefile_copy(tfc->tf_sync_data, tfc->tf);
+          LttEventPosition *ep = ltt_event_position_new();
+
+          ltt_event_position(tfc->e, ep);
+          
+          ltt_tracefile_seek_position(tfc->tf, ep);
+          g_free(ep);
+        }
+      }
+    }
+  }
+}
+
+
 
 void lttv_process_traceset_begin(LttvTracesetContext *self,
                                  LttvHooks       *before_traceset,
@@ -638,8 +676,8 @@ guint lttv_process_traceset_middle(LttvTracesetContext *self,
 
     if(last_ret == TRUE ||
        count >= nb_events ||
-     ((end_position==NULL)?FALSE:(lttv_traceset_context_ctx_pos_compare(self,
-                                                          end_position) >= 0))||
+     (end_position!=NULL&&lttv_traceset_context_ctx_pos_compare(self,
+                                                          end_position) == 0)||
        ltt_time_compare(tfc->timestamp, end) >= 0)
     {
       return count;
@@ -849,7 +887,7 @@ lttv_trace_find_hook(LttTrace *t, char *facility, char *event_type,
 }
 
 
-LttvTracesetContextPosition *ltt_traceset_context_position_new()
+LttvTracesetContextPosition *lttv_traceset_context_position_new()
 {
   return g_new(LttvTracesetContextPosition,1);
 }
index 3a3f5f61fab13ff4cfe743affdfea7c52cf96cd6..2c2739029866ac1b30814c66458adb45ecd58866 100644 (file)
@@ -180,6 +180,12 @@ GType lttv_tracefile_context_get_type (void);
 void lttv_process_traceset(LttvTracesetContext *self, LttTime end, 
     unsigned nb_events);
 
+/* Save the complete tracefile information in the context */
+//void lttv_process_traceset_get_sync_data(LttvTracesetContext *self);
+
+/* Put all the tracefiles at the tracefile context position */
+void lttv_process_traceset_synchronize_tracefiles(LttvTracesetContext *self);
+
 /* Process traceset can also be done in smaller pieces calling begin,
  * then seek and middle repeatedly, and end. The middle function return the
  * number of events processed. It will be smaller than nb_events if the end time
@@ -278,11 +284,11 @@ typedef struct _LttvTraceHook {
 void lttv_trace_find_hook(LttTrace *t, char *facility, char *event_type,
     char *field1, char *field2, char *field3, LttvHook h, LttvTraceHook *th);
 
-
 LttvTracefileContext *lttv_traceset_context_get_current_tfc(
                              LttvTracesetContext *self);
 
-LttvTracesetContextPosition *ltt_traceset_context_position_new();
+
+LttvTracesetContextPosition *lttv_traceset_context_position_new();
 
 void lttv_traceset_context_position_save(const LttvTracesetContext *self,
                                     LttvTracesetContextPosition *pos);
@@ -293,14 +299,14 @@ void lttv_traceset_context_position_copy(LttvTracesetContextPosition *dest,
                                    const LttvTracesetContextPosition *src);
 
 gint lttv_traceset_context_pos_pos_compare(
-                              const LttvTracesetContextPosition *pos1,
-                              const LttvTracesetContextPosition *pos2);
+                          const LttvTracesetContextPosition *pos1,
+                          const LttvTracesetContextPosition *pos2);
 
 gint lttv_traceset_context_ctx_pos_compare(const LttvTracesetContext *self,
-                                        const LttvTracesetContextPosition *pos);
+                                    const LttvTracesetContextPosition *pos2);
 
-gint lttv_traceset_context_pos_pos_compare(const LttvTracesetContextPosition *a,
-                                          const LttvTracesetContextPosition *b);
 LttTime lttv_traceset_context_position_get_time(
-                                  const LttvTracesetContextPosition *pos);
+                                      const LttvTracesetContextPosition *pos);
+
+
 #endif // PROCESSTRACE_H
This page took 0.027515 seconds and 4 git commands to generate.