From: Pierre-Marc Fournier Date: Fri, 12 Feb 2010 18:19:00 +0000 (-0500) Subject: update to trace format 2.6 X-Git-Tag: v0.2~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=31607b38d9c0df726f9f100483f2a9d32ac4ceb9;p=ust.git update to trace format 2.6 --- diff --git a/libust/serialize.c b/libust/serialize.c index a9c6f69..6a86884 100644 --- a/libust/serialize.c +++ b/libust/serialize.c @@ -647,6 +647,7 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data, largest_align = 1; /* must be non-zero for ltt_align */ data_size = ltt_get_data_size(&closure, serialize_private, &largest_align, fmt, &args_copy); + largest_align = min_t(int, largest_align, sizeof(void *)); va_end(args_copy); /* Iterate on each trace */ diff --git a/libust/tracer.h b/libust/tracer.h index 5d226cd..614d7b2 100644 --- a/libust/tracer.h +++ b/libust/tracer.h @@ -317,7 +317,7 @@ slow_path: #define LTT_DEFAULT_N_SUBBUFS_HIGH 2 #define LTT_TRACER_MAGIC_NUMBER 0x00D6B7ED #define LTT_TRACER_VERSION_MAJOR 2 -#define LTT_TRACER_VERSION_MINOR 5 +#define LTT_TRACER_VERSION_MINOR 6 /** * ust_write_trace_header - Write trace header diff --git a/libust/tracercore.h b/libust/tracercore.h index 79c2dbf..3113383 100644 --- a/libust/tracercore.h +++ b/libust/tracercore.h @@ -61,7 +61,8 @@ extern void ltt_filter_unregister(void); */ static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type) { - return (size_of_type - align_drift) & (size_of_type - 1); + size_t alignment = min(sizeof(void *), size_of_type); + return (alignment - align_drift) & (alignment - 1); } /* Default arch alignment */ #define LTT_ALIGN