assert-pre-internal.h: add BT_ASSERT_PRE_VALID_INDEX()
[babeltrace.git] / plugins / ctf / fs-src / fs.c
index eac20e420d2c2221106065eb4eed7d7c47b5d502..59a7bcab592000f46a80bc3b0b09a9cbdf772286 100644 (file)
@@ -59,7 +59,7 @@ int notif_iter_data_set_current_ds_file(struct ctf_fs_notif_iter_data *notif_ite
        ctf_fs_ds_file_destroy(notif_iter_data->ds_file);
        notif_iter_data->ds_file = ctf_fs_ds_file_create(
                notif_iter_data->ds_file_group->ctf_fs_trace,
-               notif_iter_data->graph,
+               notif_iter_data->pc_notif_iter,
                notif_iter_data->notif_iter,
                notif_iter_data->ds_file_group->stream,
                ds_file_info->path->str);
@@ -256,8 +256,7 @@ enum bt_notification_iterator_status ctf_fs_iterator_init(
                goto error;
        }
 
-       notif_iter_data->graph = bt_component_borrow_graph(
-               bt_component_borrow_from_private(port_data->ctf_fs->priv_comp));
+       notif_iter_data->pc_notif_iter = it;
        notif_iter_data->notif_iter = bt_notif_iter_create(
                port_data->ds_file_group->ctf_fs_trace->metadata->trace,
                bt_common_get_page_size() * 8,
@@ -708,7 +707,7 @@ int add_ds_file_to_ds_file_group(struct ctf_fs_trace *ctf_fs_trace,
                goto error;
        }
 
-       ds_file = ctf_fs_ds_file_create(ctf_fs_trace, graph, notif_iter,
+       ds_file = ctf_fs_ds_file_create(ctf_fs_trace, NULL, notif_iter,
                NULL, path);
        if (!ds_file) {
                goto error;
@@ -964,42 +963,6 @@ end:
        return ret;
 }
 
-static
-int create_cc_prio_map(struct ctf_fs_trace *ctf_fs_trace)
-{
-       int ret = 0;
-       size_t i;
-       int count;
-
-       BT_ASSERT(ctf_fs_trace);
-       ctf_fs_trace->cc_prio_map = bt_clock_class_priority_map_create();
-       if (!ctf_fs_trace->cc_prio_map) {
-               ret = -1;
-               goto end;
-       }
-
-       count = bt_trace_get_clock_class_count(
-               ctf_fs_trace->metadata->trace);
-       BT_ASSERT(count >= 0);
-
-       for (i = 0; i < count; i++) {
-               struct bt_clock_class *clock_class =
-                       bt_trace_borrow_clock_class_by_index(
-                               ctf_fs_trace->metadata->trace, i);
-
-               BT_ASSERT(clock_class);
-               ret = bt_clock_class_priority_map_add_clock_class(
-                       ctf_fs_trace->cc_prio_map, clock_class, 0);
-
-               if (ret) {
-                       goto end;
-               }
-       }
-
-end:
-       return ret;
-}
-
 BT_HIDDEN
 struct ctf_fs_trace *ctf_fs_trace_create(const char *path, const char *name,
                struct ctf_fs_metadata_config *metadata_config,
@@ -1044,11 +1007,6 @@ struct ctf_fs_trace *ctf_fs_trace_create(const char *path, const char *name,
                goto error;
        }
 
-       ret = create_cc_prio_map(ctf_fs_trace);
-       if (ret) {
-               goto error;
-       }
-
        /*
         * create_ds_file_groups() created all the streams that this
         * trace needs. There won't be any more. Therefore it is safe to
This page took 0.024262 seconds and 4 git commands to generate.