X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fmarker.c;h=3e2ab3d68cd4c98cbbac008dd31bf662085dc4e6;hb=256a5b3a59052aabbb4168c052764b5ba552ae99;hp=07c50f27d3581809dfc4b898bfd7fd0c045db7ee;hpb=565460eafbf79918133fa354b0827aa5a692f46e;p=lttv.git diff --git a/ltt/branches/poly/ltt/marker.c b/ltt/branches/poly/ltt/marker.c index 07c50f27..3e2ab3d6 100644 --- a/ltt/branches/poly/ltt/marker.c +++ b/ltt/branches/poly/ltt/marker.c @@ -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: