From: Mathieu Desnoyers Date: Thu, 12 Nov 2009 22:43:31 +0000 (-0500) Subject: Change __SIZEOF_LONG__ for __WORDSIZE X-Git-Tag: v0.12.20~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e9a5b51409e5694eac4454885ea66b037e169b1d;p=lttv.git Change __SIZEOF_LONG__ for __WORDSIZE Signed-off-by: Mathieu Desnoyers --- diff --git a/lttv/lttv/print.c b/lttv/lttv/print.c index f217b136..f0dabbcc 100644 --- a/lttv/lttv/print.c +++ b/lttv/lttv/print.c @@ -65,7 +65,7 @@ static inline void print_enum_events(LttEvent *e, struct marker_field *f, g_quark_to_string(nt->soft_irq_names[value])); } else if (info->name == LTT_EVENT_KPROBE && f->name == LTT_FIELD_IP) { -#if (__SIZEOF_LONG__ == 4) +#if (__WORDSIZE == 32) GQuark symbol = (GQuark)g_hash_table_lookup(nt->kprobe_hash, (gconstpointer)&value); #else diff --git a/lttv/lttv/state.c b/lttv/lttv/state.c index d65ee57f..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)); @@ -2085,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