X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Fctf%2Ffs-src%2Fdata-stream-file.h;h=e403656eb3bdf7cc2540269d8e5aadff2adec6cc;hb=e5be10efe4d5543ba697c7e607ca0a5c33fa3ccb;hp=99efd36fae3df5a75db12f0bcb022ac1c41f36ba;hpb=97ade20be9c0184f651dc247a19e68a11afdeab3;p=babeltrace.git diff --git a/plugins/ctf/fs-src/data-stream-file.h b/plugins/ctf/fs-src/data-stream-file.h index 99efd36f..e403656e 100644 --- a/plugins/ctf/fs-src/data-stream-file.h +++ b/plugins/ctf/fs-src/data-stream-file.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "../common/notif-iter/notif-iter.h" #include "lttng-index.h" @@ -81,33 +81,38 @@ struct ctf_fs_ds_file_info { GString *path; /* Guaranteed to be set, as opposed to the index. */ - uint64_t begin_ns; + int64_t begin_ns; }; +struct ctf_fs_metadata; + struct ctf_fs_ds_file { - /* Owned by this */ - struct ctf_fs_file *file; + /* Weak */ + struct ctf_fs_metadata *metadata; - /* Owned by this */ - struct bt_ctf_stream *stream; + /* Weak */ + struct bt_private_connection_private_notification_iterator *pc_notif_iter; /* Owned by this */ - struct bt_clock_class_priority_map *cc_prio_map; + struct ctf_fs_file *file; /* Owned by this */ - struct bt_ctf_notif_iter *notif_iter; + struct bt_private_stream *stream; + + /* Weak */ + struct bt_notif_iter *notif_iter; void *mmap_addr; - /* Max length of chunk to mmap() when updating the current mapping. */ + /* + * Max length of chunk to mmap() when updating the current mapping. + * This value must be page-aligned. + */ size_t mmap_max_len; - /* Length of the current mapping. */ + /* Length of the current mapping. Never exceeds the file's length. */ size_t mmap_len; - /* Length of the current mapping which *exists* in the backing file. */ - size_t mmap_valid_len; - /* Offset in the file where the current mapping starts. */ off_t mmap_offset; @@ -123,20 +128,23 @@ struct ctf_fs_ds_file { BT_HIDDEN struct ctf_fs_ds_file *ctf_fs_ds_file_create( struct ctf_fs_trace *ctf_fs_trace, - struct bt_ctf_stream *stream, const char *path); + struct bt_private_connection_private_notification_iterator *pc_notif_iter, + struct bt_notif_iter *notif_iter, + struct bt_private_stream *stream, const char *path); BT_HIDDEN -int ctf_fs_ds_file_get_packet_header_context_fields( +int ctf_fs_ds_file_borrow_packet_header_context_fields( struct ctf_fs_ds_file *ds_file, - struct bt_ctf_field **packet_header_field, - struct bt_ctf_field **packet_context_field); + struct bt_private_field **packet_header_field, + struct bt_private_field **packet_context_field); BT_HIDDEN void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *stream); BT_HIDDEN -struct bt_notification_iterator_next_return ctf_fs_ds_file_next( - struct ctf_fs_ds_file *stream); +enum bt_notification_iterator_status ctf_fs_ds_file_next( + struct ctf_fs_ds_file *ds_file, + struct bt_private_notification **notif); BT_HIDDEN struct ctf_fs_ds_index *ctf_fs_ds_file_build_index( @@ -145,4 +153,6 @@ struct ctf_fs_ds_index *ctf_fs_ds_file_build_index( BT_HIDDEN void ctf_fs_ds_index_destroy(struct ctf_fs_ds_index *index); +extern struct bt_notif_iter_medium_ops ctf_fs_ds_file_medops; + #endif /* CTF_FS_DS_FILE_H */