From: Yannick Brosseau Date: Tue, 14 Aug 2012 14:58:03 +0000 (-0400) Subject: Be more specific in the no SEEK_LAST fallback X-Git-Tag: v1.5-beta1~44 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b9410cf1476ff6e407da89b0aa5aaeeb6f4c202b;p=lttv.git Be more specific in the no SEEK_LAST fallback Signed-off-by: Yannick Brosseau --- diff --git a/lttv/lttv/traceset.c b/lttv/lttv/traceset.c index f91010e0..7e86c5b7 100644 --- a/lttv/lttv/traceset.c +++ b/lttv/lttv/traceset.c @@ -599,19 +599,20 @@ guint64 lttv_traceset_get_timestamp_end(LttvTraceset *traceset) */ TimeInterval lttv_traceset_get_time_span_real(LttvTraceset *ts) { -#ifdef BABEL_HAS_SEEK_LAST + if(ltt_time_compare(ts->time_span.start_time, ltt_time_zero) == 0 && ts->traces->len > 0){ ts->time_span.start_time = ltt_time_from_uint64( lttv_traceset_get_timestamp_first_event(ts)); +#ifdef BABEL_HAS_SEEK_LAST ts->time_span.end_time = ltt_time_from_uint64( lttv_traceset_get_timestamp_end(ts)); - } - return ts->time_span; #else - return lttv_traceset_get_time_span(ts); + ts->time_span.end_time = lttv_traceset_get_time_span(ts).end_time; #endif + } + return ts->time_span; } /*