X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lttv%2Flttv%2Fstate.c;h=5c6f77c095c6f331d85183bc2f3653fcfa54b148;hb=b681cb7026c73e5802b71ebbe14fa053411f6aa3;hp=1a245500f8995ea7e211ab071e78f22a2fff6e86;hpb=1cd9058f63bc277629d796bac29c4530d151bea4;p=lttv.git diff --git a/lttv/lttv/state.c b/lttv/lttv/state.c index 1a245500..5c6f77c0 100644 --- a/lttv/lttv/state.c +++ b/lttv/lttv/state.c @@ -232,7 +232,7 @@ static void bdevstate_free_cb(gpointer key, gpointer value, gpointer user_data); static LttvBdevState *bdevstate_copy(LttvBdevState *bds); -#if (__SIZEOF_LONG__ == 4) +#if (__WORDSIZE == 32) guint guint64_hash(gconstpointer key) { guint64 ukey = *(const guint64 *)key; @@ -355,7 +355,7 @@ static void expand_syscall_table(LttvTraceState *ts, int id) static void expand_kprobe_table(LttvTraceState *ts, guint64 ip, char *symbol) { LttvNameTables *nt = ts->name_tables; -#if (__SIZEOF_LONG__ == 4) +#if (__WORDSIZE == 32) guint64 *ip_ptr = g_new(guint64, 1); g_hash_table_insert(nt->kprobe_hash, ip_ptr, (gpointer)(glong)g_quark_from_string(symbol)); @@ -1707,6 +1707,7 @@ static void state_restore(LttvTraceState *self, LttvAttribute *container) LttEventPosition *ep; LttvTracesetContext *tsc = self->parent.ts_context; + int retval; tracefiles_tree = lttv_attribute_find_subdir(container, LTTV_STATE_TRACEFILES); @@ -1794,9 +1795,10 @@ static void state_restore(LttvTraceState *self, LttvAttribute *container) g_tree_remove(tsc->pqueue, tfc); if(ep != NULL) { - g_assert(ltt_tracefile_seek_position(tfc->tf, ep) == 0); + retval= ltt_tracefile_seek_position(tfc->tf, ep); + g_assert_cmpint(retval, ==, 0); tfc->timestamp = ltt_event_time(ltt_tracefile_get_event(tfc->tf)); - g_assert(ltt_time_compare(tfc->timestamp, ltt_time_infinite) != 0); + g_assert_cmpint(ltt_time_compare(tfc->timestamp, ltt_time_infinite), !=, 0); g_tree_insert(tsc->pqueue, tfc, tfc); g_info("Restoring state for a tf at time %lu.%lu", tfc->timestamp.tv_sec, tfc->timestamp.tv_nsec); } else { @@ -2083,7 +2085,7 @@ create_name_tables(LttvTraceState *tcs) g_string_free(fe_name, TRUE); -#if (__SIZEOF_LONG__ == 4) +#if (__WORDSIZE == 32) name_tables->kprobe_hash = g_hash_table_new_full(guint64_hash, guint64_equal, g_free, NULL); #else