Babeltrace API timestamp manipulation changes
Quoted 14 lines · Julien Desfossez
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.
Quoted 8 lines
This means some API changes :
- the "seek_time" member of thebt_iter_posstructure 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 thembt_ctf_get_timestamp and bt_ctf_get_cycles ?
Yannick
Quoted 23 lines · * Yannick Brosseau ([email protected]) wrote:
Quoted 14 lines · Julien Desfossez
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.
Quoted 8 lines
This means some API changes :
- the "seek_time" member of thebt_iter_posstructure 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
Quoted 2 lines
Why not simply calling them
bt_ctf_get_timestampandbt_ctf_get_cycles?
Yes, it makes sense. Julien, any thoughts on this ?
Thanks,
Mathieu
Quoted 7 lines
Yannick
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com