X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=trunk%2Flttv%2Fltt%2Ftracefile.c;h=1d411e3e3f2ad94cc31e60e1bdbc53c35956534d;hb=e0c7c4004c56c9ad749889225f9b53aedc01fb30;hp=d30dc51188b0470327cbb212253614fd1c99d536;hpb=1550fba68437fc32b4f0ee82d82553c0fddb6d8a;p=lttv.git diff --git a/trunk/lttv/ltt/tracefile.c b/trunk/lttv/ltt/tracefile.c index d30dc511..1d411e3e 100644 --- a/trunk/lttv/ltt/tracefile.c +++ b/trunk/lttv/ltt/tracefile.c @@ -772,11 +772,18 @@ LttTrace *ltt_trace_open(const gchar *pathname) goto metadata_error; } - /* Get the trace information for the control/metadata_0 tracefile */ + /* + * Get the trace information for the control/metadata_0 tracefile. + * Getting a correct trace start_time and start_tsc is insured by the fact + * that no subbuffers are supposed to be lost in the metadata channel. + * Therefore, the first subbuffer contains the start_tsc timestamp in its + * buffer header. + */ g_assert(group->len > 0); tf = &g_array_index (group, LttTracefile, 0); header = (ltt_subbuffer_header_t *)tf->buffer.head; - g_assert(parse_trace_header(header, tf, t) == 0); + ret = parse_trace_header(header, tf, t); + g_assert(!ret); t->num_cpu = group->len;