From d7cf605c87a188430e4c6b23bda605147a1f49e7 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 22 Aug 2005 16:29:11 +0000 Subject: [PATCH] small state.c fixes git-svn-id: http://ltt.polymtl.ca/svn@1045 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/stats.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/stats.c b/ltt/branches/poly/lttv/lttv/stats.c index fd7b13a8..ff3cc53d 100644 --- a/ltt/branches/poly/lttv/lttv/stats.c +++ b/ltt/branches/poly/lttv/lttv/stats.c @@ -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); -- 2.34.1