change has_alignment for alignment
[lttv.git] / ltt / branches / poly / ltt / marker.c
index 07c50f27d3581809dfc4b898bfd7fd0c045db7ee..3e2ab3d68cd4c98cbbac008dd31bf662085dc4e6 100644 (file)
@@ -267,11 +267,17 @@ long marker_update_fields_offsets(struct marker_info *info, const char *data)
   unsigned int i;
   long offset = 0;
 
-  for (i = 0; i < info->fields->len; i++) {
+  /* Find the last field with a static offset, then update from there. */
+  for (i = info->fields->len - 1; i >= 0; i--) {
     field = &g_array_index(info->fields, struct marker_field, i);
+    if (field->static_offset) {
+      offset = field->offset;
+      break;
+    }
+  }
 
-    if (field->static_offset)
-      continue;
+  for (; i < info->fields->len; i++) {
+    field = &g_array_index(info->fields, struct marker_field, i);
 
     switch (field->type) {
     case LTT_TYPE_SIGNED_INT:
This page took 0.02394 seconds and 4 git commands to generate.