directory creation
[lttv.git] / ltt / branches / poly / lttv / state.c
index 4176313c82391c008ede664a67c4f92886266af1..dbdb11ce8b7f51b39f972f423fbd626ba526e461 100644 (file)
@@ -3,6 +3,7 @@
 #include <ltt/facility.h>
 #include <ltt/trace.h>
 #include <ltt/event.h>
+#include <ltt/type.h>
 
 LttvExecutionMode
   LTTV_STATE_MODE_UNKNOWN,
@@ -257,7 +258,7 @@ static void state_save(LttvTraceState *self, LttvAttribute *container)
         LTTV_POINTER);
     if(tfcs->parent.e == NULL) *(value.v_pointer) = NULL;
     else {
-      ep = g_new(LttEventPosition, 1);
+      ep = ltt_event_position_new();
       ltt_event_position(tfcs->parent.e, ep);
       *(value.v_pointer) = ep;
     }
@@ -533,7 +534,7 @@ static LttvProcessState *create_process(LttvTracefileState *tfs,
   char buffer[128];
 
   tcs = (LttvTraceState *)tc = tfs->parent.t_context;
-
+       
   g_hash_table_insert(tcs->processes, GUINT_TO_POINTER(pid), process);
   process->pid = pid;
 
@@ -694,7 +695,7 @@ static gboolean schedchange(void *hook_data, void *call_data)
     else s->process->state->s = LTTV_STATE_WAIT;
 
     if(s->process->pid == 0)
-      s->process->pid == pid_out;
+      s->process->pid = pid_out;
 
     s->process->state->change = s->parent.timestamp;
   }
@@ -861,7 +862,7 @@ static gboolean block_end(void *hook_data, void *call_data)
 
   LttvTraceState *tcs = (LttvTraceState *)(tfcs->parent.t_context);
 
-  LttEventPosition ep;
+  LttEventPosition *ep = ltt_event_position_new();
 
   guint nb_block, nb_event;
 
@@ -871,9 +872,9 @@ static gboolean block_end(void *hook_data, void *call_data)
 
   LttvAttributeValue value;
 
-  ltt_event_position(tfcs->parent.e, &ep);
+  ltt_event_position(tfcs->parent.e, ep);
 
-  ltt_event_position_get(&ep, &nb_block, &nb_event, &tf);
+  ltt_event_position_get(ep, &nb_block, &nb_event, &tf);
   tcs->nb_event += nb_event - tfcs->saved_position;
   tfcs->saved_position = 0;
   if(tcs->nb_event >= tcs->save_interval) {
This page took 0.024925 seconds and 4 git commands to generate.