update to trace format 2.6
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 12 Feb 2010 18:19:00 +0000 (13:19 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Feb 2010 05:40:36 +0000 (00:40 -0500)
libust/serialize.c
libust/tracer.h
libust/tracercore.h

index a9c6f69b79dd4e97b1d3e66169bd780a9aef44f7..6a8688420369ee073d3ae3fba779ed70d23181e1 100644 (file)
@@ -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 */
index 5d226cd63b8dbb46a85dad4c047c170afa48787b..614d7b2c2877b32703296ec40cbe9506017cf551 100644 (file)
@@ -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
index 79c2dbf9d3635f134dcb893154b9f5509e31f580..3113383cfd69184e52cd06f1a81f3b47566f8472 100644 (file)
@@ -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
This page took 0.026544 seconds and 4 git commands to generate.