[lttng-dev] Babeltrace API timestamp manipulation changes

Yannick Brosseau yannick.brosseau at gmail.com
Fri Aug 3 15:57:38 EDT 2012


On 2012-08-03 15:27, Julien Desfossez wrote:
> 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
>
Why not simply calling them
bt_ctf_get_timestamp and bt_ctf_get_cycles  ?

Yannick



More information about the lttng-dev mailing list