ctf: msg-iter: add event timestamp accessors
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 14 Jun 2019 13:44:41 +0000 (09:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:22 +0000 (11:58 -0400)
commit5ce43109b0457a954cd38f955b390a779941e4cb
tree5cd91dcff7b3936bd2d9af4366edc0cea1a5bda0
parentd67906d7085185a0e9748582eb1d9502da96c467
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.02522 seconds and 4 git commands to generate.