lib: remove CV snapshot property from stream beginning/end message
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 7 Feb 2019 18:47:02 +0000 (13:47 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:37 +0000 (18:19 -0400)
The beginning and end times of a given stream will be given by another
type of message implemented in a subsequent patch.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
include/babeltrace/graph/message-stream-const.h
include/babeltrace/graph/message-stream-internal.h
include/babeltrace/graph/message-stream.h
lib/graph/message/stream.c

index a7bf8d7b298dbd9ad68a1322776e0e1b55c9b56c..fbac59624931ee66182e2909397c3121ab7d8be3 100644 (file)
@@ -37,17 +37,9 @@ extern "C" {
 extern const bt_stream *bt_message_stream_beginning_borrow_stream_const(
                const bt_message *message);
 
-extern bt_clock_snapshot_state
-bt_message_stream_beginning_borrow_default_clock_snapshot_const(
-               const bt_message *msg, const bt_clock_snapshot **snapshot);
-
 extern const bt_stream *bt_message_stream_end_borrow_stream_const(
                const bt_message *message);
 
-extern bt_clock_snapshot_state
-bt_message_stream_end_borrow_default_clock_snapshot_const(
-               const bt_message *msg, const bt_clock_snapshot **snapshot);
-
 #ifdef __cplusplus
 }
 #endif
index 3752c109e44acb25aaf36d97feaf430c309a6503..36e4580c04e5def7baf19b4c3b494767acd2113e 100644 (file)
 struct bt_message_stream_beginning {
        struct bt_message parent;
        struct bt_stream *stream;
-       struct bt_clock_snapshot *default_cs;
 };
 
 struct bt_message_stream_end {
        struct bt_message parent;
        struct bt_stream *stream;
-       struct bt_clock_snapshot *default_cs;
 };
 
 #endif /* BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H */
index e810a6616a554a4bc9f29b288c4655af380439a2..e12b909013923435398fd44543905b1841ac46b3 100644 (file)
@@ -44,15 +44,9 @@ bt_message *bt_message_stream_end_create(
 extern bt_stream *bt_message_stream_beginning_borrow_stream(
                bt_message *message);
 
-extern void bt_message_stream_beginning_set_default_clock_snapshot(
-               bt_message *msg, uint64_t value_cycles);
-
 extern bt_stream *bt_message_stream_end_borrow_stream(
                bt_message *message);
 
-extern void bt_message_stream_end_set_default_clock_snapshot(
-               bt_message *msg, uint64_t value_cycles);
-
 #ifdef __cplusplus
 }
 #endif
index 2bfa5600da18296a81f9eaeb3adb8bb664a2eb73..0d6f374c2ab88cec6ed8afda6610c14a3a07b5f0 100644 (file)
@@ -46,12 +46,6 @@ void bt_message_stream_end_destroy(struct bt_object *obj)
                message);
        BT_LIB_LOGD("Putting stream: %!+s", message->stream);
        BT_OBJECT_PUT_REF_AND_RESET(message->stream);
-
-       if (message->default_cs) {
-               bt_clock_snapshot_recycle(message->default_cs);
-               message->default_cs = NULL;
-       }
-
        g_free(message);
 }
 
@@ -107,40 +101,6 @@ const struct bt_stream *bt_message_stream_end_borrow_stream_const(
                (void *) message);
 }
 
-void bt_message_stream_end_set_default_clock_snapshot(
-               struct bt_message *msg, uint64_t value_cycles)
-{
-       struct bt_message_stream_end *se_msg = (void *) msg;
-
-       BT_ASSERT_PRE_NON_NULL(msg, "Message");
-       BT_ASSERT_PRE_HOT(msg, "Message", ": %!+n", msg);
-       BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_STREAM_END);
-       BT_ASSERT_PRE(se_msg->stream->class->default_clock_class,
-               "Message's stream class has no default clock class: "
-               "%![msg-]+n, %![sc-]+S", msg, se_msg->stream->class);
-
-       /* TODO: have the object already created */
-       se_msg->default_cs = bt_clock_snapshot_create(
-               se_msg->stream->class->default_clock_class);
-       BT_ASSERT(se_msg->default_cs);
-       bt_clock_snapshot_set_raw_value(se_msg->default_cs, value_cycles);
-       BT_LIB_LOGV("Set message's default clock snapshot: %![msg-]+n, "
-               "value=%" PRIu64, value_cycles);
-}
-
-enum bt_clock_snapshot_state
-bt_message_stream_end_borrow_default_clock_snapshot_const(
-               const bt_message *msg, const bt_clock_snapshot **snapshot)
-{
-       struct bt_message_stream_end *stream_end = (void *) msg;
-
-       BT_ASSERT_PRE_NON_NULL(msg, "Message");
-       BT_ASSERT_PRE_NON_NULL(snapshot, "Clock snapshot (output)");
-       BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_STREAM_END);
-       *snapshot = stream_end->default_cs;
-       return BT_CLOCK_SNAPSHOT_STATE_KNOWN;
-}
-
 static
 void bt_message_stream_beginning_destroy(struct bt_object *obj)
 {
@@ -151,12 +111,6 @@ void bt_message_stream_beginning_destroy(struct bt_object *obj)
                message);
        BT_LIB_LOGD("Putting stream: %!+s", message->stream);
        BT_OBJECT_PUT_REF_AND_RESET(message->stream);
-
-       if (message->default_cs) {
-               bt_clock_snapshot_recycle(message->default_cs);
-               message->default_cs = NULL;
-       }
-
        g_free(message);
 }
 
@@ -210,38 +164,3 @@ const struct bt_stream *bt_message_stream_beginning_borrow_stream_const(
        return bt_message_stream_beginning_borrow_stream(
                (void *) message);
 }
-
-void bt_message_stream_beginning_set_default_clock_snapshot(
-               struct bt_message *msg,
-               uint64_t value_cycles)
-{
-       struct bt_message_stream_beginning *sb_msg = (void *) msg;
-
-       BT_ASSERT_PRE_NON_NULL(msg, "Message");
-       BT_ASSERT_PRE_HOT(msg, "Message", ": %!+n", msg);
-       BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_STREAM_BEGINNING);
-       BT_ASSERT_PRE(sb_msg->stream->class->default_clock_class,
-               "Message's stream class has no default clock class: "
-               "%![msg-]+n, %![sc-]+S", msg, sb_msg->stream->class);
-
-       /* TODO: have the object already created */
-       sb_msg->default_cs = bt_clock_snapshot_create(
-               sb_msg->stream->class->default_clock_class);
-       BT_ASSERT(sb_msg->default_cs);
-       bt_clock_snapshot_set_raw_value(sb_msg->default_cs, value_cycles);
-       BT_LIB_LOGV("Set message's default clock snapshot: %![msg-]+n, "
-               "value=%" PRIu64, value_cycles);
-}
-
-enum bt_clock_snapshot_state
-bt_message_stream_beginning_borrow_default_clock_snapshot_const(
-               const bt_message *msg, const bt_clock_snapshot **snapshot)
-{
-       struct bt_message_stream_beginning *stream_beginning = (void *) msg;
-
-       BT_ASSERT_PRE_NON_NULL(msg, "Message");
-       BT_ASSERT_PRE_NON_NULL(snapshot, "Clock snapshot (output)");
-       BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_STREAM_END);
-       *snapshot = stream_beginning->default_cs;
-       return BT_CLOCK_SNAPSHOT_STATE_KNOWN;
-}
This page took 0.027199 seconds and 4 git commands to generate.