[lttng-dev] Babeltrace API timestamp manipulation changes

Julien Desfossez jdesfossez at efficios.com
Fri Aug 3 15:27:35 EDT 2012


Hi,

Previously, the Babeltrace API forced the user to manipulate "raw
timestamps" to seek, to get the timestamp begin and end of a trace, etc.

This raw timestamp represented the cycle value scaled with the frequency
but did not meant anything to the user and was likely to cause problem
when dealing with traces recorded with different clock sources.

The new patches commited in Babeltrace today removed the notion of the
raw clock-source all over the code, and now the users can manipulate
real timestamps (with the timezone offset applied) or cycle values if
they want more fine-grained control on a specific trace.

This means some API changes :
- the "seek_time" member of the bt_iter_pos structure now takes real
timestamp (with the offset applied)
- the functions "bt_ctf_get_timestamp_raw" is removed
- the funtion "bt_ctf_get_timestamp" is replaced by
"bt_ctf_get_real_timestamp"
- the function "bt_ctf_get_cycles_timestamp" is added
- the functions "bt_trace_handle_get_timestamp_begin" and
"bt_trace_handle_get_timestamp_end" now take a third parameter, either
BT_CLOCK_CYCLES or BT_CLOCK_REAL.

If you have any questions, feel free to ask.

Thanks,

Julien



More information about the lttng-dev mailing list