From 9d7d747f10bab16b3d85915a5b87e10acd2374f0 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 4 Nov 2011 15:21:02 -0400 Subject: [PATCH] lttng context: perf counter, fix 32-bit vs 64-bit field size bug Signed-off-by: Mathieu Desnoyers --- lttng-context-perf-counters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.34.1