small state.c fixes
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 22 Aug 2005 16:29:11 +0000 (16:29 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 22 Aug 2005 16:29:11 +0000 (16:29 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1045 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/stats.c

index fd7b13a88db11c422307168e368ea65f2e7bb378..ff3cc53d90ccf1a4e9b43798b02370d4a81f4fbd 100644 (file)
@@ -524,13 +524,15 @@ gboolean before_schedchange(void *hook_data, void *call_data)
 
   LttvTraceHookByFacility *thf = (LttvTraceHookByFacility *)hook_data;
 
-  guint pid_in, pid_out, state_out;
+  guint pid_in, pid_out;
+    
+  gint state_out;
 
   LttvProcessState *process;
 
   pid_out = ltt_event_get_unsigned(e, thf->f1);
   pid_in = ltt_event_get_unsigned(e, thf->f2);
-  state_out = ltt_event_get_unsigned(e, thf->f3);
+  state_out = ltt_event_get_int(e, thf->f3);
 
   /* compute the time for the process to schedule out */
 
@@ -877,7 +879,7 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_FREE,
         LTT_FIELD_PID, 0, 0,
-        process_free, &g_array_index(hooks, LttvTraceHook, 7));
+        process_free, &g_array_index(hooks, LttvTraceHook, 8));
     g_assert(!ret);
 
 
@@ -888,8 +890,8 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
     nb_tracefile = ts->parent.parent.tracefiles->len;
 
     for(j = 0 ; j < nb_tracefile ; j++) {
-      tfs = LTTV_TRACEFILE_STATS(&g_array_index(ts->parent.parent.tracefiles,
-                                  LttvTracefileContext, j));
+      tfs = LTTV_TRACEFILE_STATS(g_array_index(ts->parent.parent.tracefiles,
+                                  LttvTracefileContext*, j));
       lttv_hooks_add(tfs->parent.parent.event, every_event, NULL, 
                      LTTV_PRIO_DEFAULT);
 
This page took 0.024758 seconds and 4 git commands to generate.