CTF IR -> Trace IR
[babeltrace.git] / lib / graph / notification / event.c
index 6251979d266a20f845334277302a1ea18077e725..d8178eca6fea9e62a4c1f5813704513a7667aea3 100644 (file)
 
 #include <babeltrace/compiler-internal.h>
 #include <babeltrace/object-internal.h>
-#include <babeltrace/ctf-ir/event.h>
-#include <babeltrace/ctf-ir/event-internal.h>
-#include <babeltrace/ctf-ir/event-class-internal.h>
-#include <babeltrace/ctf-ir/stream-class-internal.h>
-#include <babeltrace/ctf-ir/trace.h>
+#include <babeltrace/trace-ir/event.h>
+#include <babeltrace/trace-ir/event-internal.h>
+#include <babeltrace/trace-ir/event-class-internal.h>
+#include <babeltrace/trace-ir/stream-class-internal.h>
+#include <babeltrace/trace-ir/trace.h>
 #include <babeltrace/graph/graph-internal.h>
 #include <babeltrace/graph/notification-event-internal.h>
 #include <babeltrace/graph/private-connection-private-notification-iterator.h>
@@ -84,7 +84,6 @@ struct bt_notification *bt_notification_event_create(
        struct bt_notification_event *notification = NULL;
        struct bt_event *event;
        struct bt_graph *graph;
-       int ret;
 
        BT_ASSERT_PRE_NON_NULL(notif_iter, "Notification iterator");
        BT_ASSERT_PRE_NON_NULL(event_class, "Event class");
@@ -104,20 +103,6 @@ struct bt_notification *bt_notification_event_create(
                goto error;
        }
 
-       /*
-        * Set packet's properties. This can fail so it happens before
-        * creating the notification below. We freeze it after we know
-        * this function succeeds.
-        */
-       if (unlikely(!packet->props_are_set)) {
-               ret = bt_packet_set_properties(packet);
-               if (ret) {
-                       BT_LIB_LOGE("Cannot update packet's properties: "
-                               "%![prev-packet-]+a", packet);
-                       goto error;
-               }
-       }
-
        /*
         * Create notification from pool _after_ we have everything
         * (in this case, a valid event object) so that we never have an
@@ -145,7 +130,7 @@ struct bt_notification *bt_notification_event_create(
        BT_ASSERT(!notification->event);
        notification->event = event;
        bt_packet_set_is_frozen(packet, true);
-       bt_packet_validate_properties(packet);
+       bt_event_class_freeze(event_class);
        BT_LOGD("Created event notification object: "
                "event-addr=%p, event-class-addr=%p, "
                "event-class-name=\"%s\", event-class-id=%" PRId64 ", "
This page took 0.024688 seconds and 4 git commands to generate.