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);
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,
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;
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,
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