ctf: msg-iter: add event timestamp accessors
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 14 Jun 2019 13:44:41 +0000 (09:44 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 15:35:50 +0000 (11:35 -0400)
commit27f26617ac7490642cd6fc5fe6931dac16c5b3ac
treeb3e3d10610d2bcef8d7e4fcf5fdc6b2a00384dfe
parent3682dd062f77d3fcb2637f600d9b93011a02e28c
ctf: msg-iter: add event timestamp accessors

Adds functions to extract the timestamp of the first and last event of
the current packet.
  BT_HIDDEN
  enum bt_msg_iter_status bt_msg_iter_first_event_clock_snapshot(
         struct bt_msg_iter *notit, uint64_t *first_event_cs);

  BT_HIDDEN
  enum bt_msg_iter_status bt_msg_iter_last_event_clock_snapshot(
         struct bt_msg_iter *notit, uint64_t *last_event_cs);

Those functions use the `decode_until_state()` function to decode the
current packet until one of two specific states and then used the clock
value of the default clock class.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I18736151fd8367fb33c6b46d81a860f54432ad55
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1432
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/ctf/common/msg-iter/msg-iter.c
src/plugins/ctf/common/msg-iter/msg-iter.h
This page took 0.025893 seconds and 4 git commands to generate.