From: Mathieu Desnoyers Date: Fri, 4 Nov 2011 19:21:02 +0000 (-0400) Subject: lttng context: perf counter, fix 32-bit vs 64-bit field size bug X-Git-Tag: v2.0-pre11~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9d7d747f10bab16b3d85915a5b87e10acd2374f0;p=lttng-modules.git lttng context: perf counter, fix 32-bit vs 64-bit field size bug Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c index 0b3668ae..3ae2266f 100644 --- a/lttng-context-perf-counters.c +++ b/lttng-context-perf-counters.c @@ -229,9 +229,9 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, field->event_field.name = name_alloc; field->event_field.type.atype = atype_integer; - field->event_field.type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(unsigned long) * CHAR_BIT; - field->event_field.type.u.basic.integer.signedness = is_signed_type(unsigned long); + field->event_field.type.u.basic.integer.size = sizeof(uint64_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = ltt_alignof(uint64_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.signedness = is_signed_type(uint64_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; field->event_field.type.u.basic.integer.encoding = lttng_encode_none;