[lttng-dev] Babeltrace API question - how can I quickly return to rhe first event in the current packet?

Amit Margalit AMITM at il.ibm.com
Thu Apr 10 14:54:03 EDT 2014


Hello,

I am trying to implement a wrapper to libbabeltrace.so, to provide 
backward iteration capability.

I've already implemented a binary search in lib/iterator.c, in 
seek_file_stream_by_timestamp() - which helps a lot when doing any kind of 
seek. I intend to donate this patch, pretty soon.

However, it seems that the greatest benefit would come from checking 
whether the current event is not the first in its packet, returning 
quickly to the first event in the packet, and then iterating forward until 
we find the event preceding the current one.

Could someone suggest how I would implement such functionality in 
libbabeltrace? I'd be very happy to perform the implementation and donate 
the results, along with performance data.

Thanks,

Amit Margalit
IBM XIV - Storage Reinvented
XIV-NAS Development Team
Tel. 03-689-7774
Fax. 03-689-7230
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140410/8ba947c0/attachment.html>


More information about the lttng-dev mailing list