update compat
[lttv.git] / trunk / lttv / ltt / marker.c
index 5933b1b6357ed927e2f4355b7d960456fbf42466..3737f0aa615f03d7f4cedc4183b853a3b4d47023 100644 (file)
@@ -47,10 +47,6 @@ static inline const char *parse_trace_type(struct marker_info *info,
   /* parse attributes. */
   repeat:
     switch (*fmt) {
-      case 'b':
-        *attributes |= LTT_ATTRIBUTE_COMPACT;
-        ++fmt;
-        goto repeat;
       case 'n':
         *attributes |= LTT_ATTRIBUTE_NETWORK_BYTE_ORDER;
         ++fmt;
@@ -62,7 +58,7 @@ static inline const char *parse_trace_type(struct marker_info *info,
   if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' ||
       *fmt =='Z' || *fmt == 'z' || *fmt == 't' ||
       *fmt == 'S' || *fmt == '1' || *fmt == '2' ||
-      *fmt == '4' || *fmt == 8) {
+      *fmt == '4' || *fmt == '8') {
     qualifier = *fmt;
     ++fmt;
     if (qualifier == 'l' && *fmt == 'l') {
@@ -172,7 +168,6 @@ static inline const char *parse_c_type(struct marker_info *info,
     ++fmt;
     if (qualifier == 'l' && *fmt == 'l') {
       qualifier = 'L';
-      g_string_append_c(field_fmt, *fmt);
       ++fmt;
     }
   }
@@ -263,6 +258,8 @@ static inline long add_type(struct marker_info *info,
   case LTT_TYPE_POINTER:
     field->size = trace_size;
     field->alignment = trace_size;
+    info->largest_align = max((guint8)field->alignment,
+                              (guint8)info->largest_align);
     field->attributes = attributes;
     if (offset == -1) {
       field->offset = -1;
@@ -284,7 +281,7 @@ static inline long add_type(struct marker_info *info,
       field->static_offset = 1;
     return -1;
   default:
-    g_error("Unexpected type"); //FIXME: compact type
+    g_error("Unexpected type");
     return 0;
   }
 }
@@ -321,7 +318,7 @@ long marker_update_fields_offsets(struct marker_info *info, const char *data)
       // not aligning on pointer size, breaking genevent backward compatibility.
       break;
     default:
-      g_error("Unexpected type"); //FIXME: compact type
+      g_error("Unexpected type");
       return -1;
     }
   }
@@ -379,7 +376,6 @@ static void format_parse(const char *fmt, struct marker_info *info)
       offset = add_type(info, offset, name, trace_size,
             trace_type, c_size, c_type, attributes, field_count++,
            field_fmt);
-      g_string_truncate(field_fmt, 0);
       trace_size = c_size = 0;
       trace_type = c_size = LTT_TYPE_NONE;
       g_string_truncate(field_fmt, 0);
@@ -474,6 +470,7 @@ int marker_id_event(LttTrace *trace, GQuark name, guint16 id,
   info->fields = NULL;
   info->next = NULL;
   info->format = marker_get_format_from_name(trace, name);
+  info->largest_align = 1;
   if (info->format && marker_parse_format(info->format, info))
       g_error("Error parsing marker format \"%s\" for marker \"%s\"",
         info->format, g_quark_to_string(name));
This page took 0.025553 seconds and 4 git commands to generate.