-int create_one_port_for_trace(struct ctf_fs_trace *ctf_fs_trace,
+int create_one_port_for_trace(struct ctf_fs_component *ctf_fs,
+ struct ctf_fs_trace *ctf_fs_trace,
struct ctf_fs_ds_file_group *ds_file_group)
{
int ret = 0;
struct ctf_fs_port_data *port_data = NULL;
GString *port_name = NULL;
struct ctf_fs_ds_file_group *ds_file_group)
{
int ret = 0;
struct ctf_fs_port_data *port_data = NULL;
GString *port_name = NULL;
struct ctf_fs_ds_file_info *ds_file_info =
g_ptr_array_index(ds_file_group->ds_file_infos, 0);
struct ctf_fs_ds_file_info *ds_file_info =
g_ptr_array_index(ds_file_group->ds_file_infos, 0);
assert(ds_file_group->ds_file_infos->len > 0);
ds_file_info = g_ptr_array_index(ds_file_group->ds_file_infos, 0);
g_string_assign(port_name, ds_file_info->path->str);
assert(ds_file_group->ds_file_infos->len > 0);
ds_file_info = g_ptr_array_index(ds_file_group->ds_file_infos, 0);
g_string_assign(port_name, ds_file_info->path->str);
/* Create output port for this file */
port_data = g_new0(struct ctf_fs_port_data, 1);
/* Create output port for this file */
port_data = g_new0(struct ctf_fs_port_data, 1);
struct ctf_fs_ds_file_group *ds_file_group =
g_ptr_array_index(ctf_fs_trace->ds_file_groups, i);
struct ctf_fs_ds_file_group *ds_file_group =
g_ptr_array_index(ctf_fs_trace->ds_file_groups, i);
struct bt_ctf_field *packet_header_field = NULL;
struct bt_ctf_field *packet_context_field = NULL;
struct bt_ctf_stream_class *stream_class = NULL;
struct bt_ctf_field *packet_header_field = NULL;
struct bt_ctf_field *packet_context_field = NULL;
struct bt_ctf_stream_class *stream_class = NULL;
uint64_t stream_instance_id = -1ULL;
uint64_t begin_ns = -1ULL;
struct ctf_fs_ds_file_group *ds_file_group = NULL;
uint64_t stream_instance_id = -1ULL;
uint64_t begin_ns = -1ULL;
struct ctf_fs_ds_file_group *ds_file_group = NULL;
ctf_fs_trace, path, &packet_header_field,
&packet_context_field);
if (ret) {
ctf_fs_trace, path, &packet_header_field,
&packet_context_field);
if (ret) {
/* Check each file in the path directory, except specific ones */
dir = g_dir_open(ctf_fs_trace->path->str, 0, &error);
if (!dir) {
/* Check each file in the path directory, except specific ones */
dir = g_dir_open(ctf_fs_trace->path->str, 0, &error);
if (!dir) {
if (!strcmp(basename, CTF_FS_METADATA_FILENAME)) {
/* Ignore the metadata stream. */
if (!strcmp(basename, CTF_FS_METADATA_FILENAME)) {
/* Ignore the metadata stream. */
ctf_fs_trace->path->str, basename);
continue;
}
if (basename[0] == '.') {
ctf_fs_trace->path->str, basename);
continue;
}
if (basename[0] == '.') {
g_string_append_printf(file->path, "%s/%s",
ctf_fs_trace->path->str, basename);
if (!g_file_test(file->path->str, G_FILE_TEST_IS_REGULAR)) {
g_string_append_printf(file->path, "%s/%s",
ctf_fs_trace->path->str, basename);
if (!g_file_test(file->path->str, G_FILE_TEST_IS_REGULAR)) {
-struct ctf_fs_trace *ctf_fs_trace_create(struct ctf_fs_component *ctf_fs,
- const char *path, const char *name)
+struct ctf_fs_trace *ctf_fs_trace_create(const char *path, const char *name,
+ struct metadata_overrides *overrides)
/*
* create_ds_file_groups() created all the streams that this
* trace needs. There won't be any more. Therefore it is safe to
/*
* create_ds_file_groups() created all the streams that this
* trace needs. There won't be any more. Therefore it is safe to
{
GString *norm_path = NULL;
int ret = 0;
norm_path = bt_common_normalize_path(path, NULL);
if (!norm_path) {
{
GString *norm_path = NULL;
int ret = 0;
norm_path = bt_common_normalize_path(path, NULL);
if (!norm_path) {
-static
-int find_ctf_traces(struct ctf_fs_component *ctf_fs,
- GList **trace_paths, const char *start_path)
+BT_HIDDEN
+int ctf_fs_find_traces(GList **trace_paths, const char *start_path)
dir = g_dir_open(start_path, 0, &error);
if (!dir) {
if (error->code == G_FILE_ERROR_ACCES) {
dir = g_dir_open(start_path, 0, &error);
if (!dir) {
if (error->code == G_FILE_ERROR_ACCES) {
}
g_string_printf(sub_path, "%s/%s", start_path, basename);
}
g_string_printf(sub_path, "%s/%s", start_path, basename);
- ctf_fs_trace = ctf_fs_trace_create(ctf_fs, trace_path->str,
- trace_name->str);
+ ctf_fs_trace = ctf_fs_trace_create(trace_path->str,
+ trace_name->str, &metadata_overrides);
if (!strcmp(object, "metadata-info")) {
result = metadata_info_query(comp_class, params);
} else {
if (!strcmp(object, "metadata-info")) {
result = metadata_info_query(comp_class, params);
} else {