Skip to contentSkip to conversation

Babeltrace API timestamp manipulation changes

DISCUSSION Yannick Brosseau 2 participants 2 messages Aug 3, 2012 – Aug 5, 2012 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
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 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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
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 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

Quoted 2 lines

Why not simply calling them
bt_ctf_get_timestamp and bt_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