From: Mathieu Desnoyers Date: Mon, 16 Nov 2009 21:47:21 +0000 (-0500) Subject: Update trace format to 2.4 X-Git-Tag: v0.12.21~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a5ea8f1b4774e8c80ce8b0a5478a5fe8c4d46b07;p=lttv.git Update trace format to 2.4 Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt/ltt-private.h b/ltt/ltt-private.h index 797c57ca..c6320277 100644 --- a/ltt/ltt-private.h +++ b/ltt/ltt-private.h @@ -66,7 +66,7 @@ typedef guint32 uint32_t; typedef guint64 uint64_t; /* Subbuffer header */ -struct ltt_subbuffer_header_2_3 { +struct ltt_subbuffer_header_2_4 { uint64_t cycle_count_begin; /* Cycle count at subbuffer start */ uint64_t cycle_count_end; /* Cycle count at subbuffer end */ uint32_t magic_number; /* @@ -99,7 +99,7 @@ struct ltt_subbuffer_header_2_3 { char header_end[0]; /* End of header */ }; -typedef struct ltt_subbuffer_header_2_3 ltt_subbuffer_header_t; +typedef struct ltt_subbuffer_header_2_4 ltt_subbuffer_header_t; /* * Return header size without padding after the structure. Don't use packed @@ -191,11 +191,16 @@ struct LttSystemDescription { LttTime trace_end; }; -/* Calculate the offset needed to align the type. +/* + * Calculate the offset needed to align the type. * If alignment is 0, alignment is disactivated. * else, the function returns the offset needed to - * align align_drift on the alignment value (should be - * the size of the architecture). */ + * align align_drift on the alignment value. + * + * Do not limit alignment on architecture size anymore, + * because uint64_t types are aligned on 64-bit even + * on 32-bit archs. + */ static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type, size_t alignment) diff --git a/ltt/tracefile.c b/ltt/tracefile.c index efb2ca93..cbb39d0e 100644 --- a/ltt/tracefile.c +++ b/ltt/tracefile.c @@ -148,9 +148,9 @@ static int parse_trace_header(ltt_subbuffer_header_t *header, break; case 2: switch(header->minor_version) { - case 3: + case 4: { - struct ltt_subbuffer_header_2_3 *vheader = header; + struct ltt_subbuffer_header_2_4 *vheader = header; tf->buffer_header_size = ltt_subbuffer_header_size(); tf->tscbits = 27; tf->eventbits = 5; diff --git a/lttv/lttv/print.c b/lttv/lttv/print.c index f0dabbcc..4b7ef447 100644 --- a/lttv/lttv/print.c +++ b/lttv/lttv/print.c @@ -69,7 +69,7 @@ static inline void print_enum_events(LttEvent *e, struct marker_field *f, GQuark symbol = (GQuark)g_hash_table_lookup(nt->kprobe_hash, (gconstpointer)&value); #else - GQuark symbol = (GQuark)g_hash_table_lookup(nt->kprobe_hash, + GQuark symbol = (GQuark)(unsigned long)g_hash_table_lookup(nt->kprobe_hash, (gconstpointer)value); #endif if (symbol)