X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Fctf%2Ffs%2Ffs.h;h=2c0972e6da91fd5c8b2efc3c4411ba1b0c066f12;hb=6ba0b073d3cc5040234aad3ab820b7ca4022e3e9;hp=cf574c8b3c32462ec5bb98e0d8f1a541dea6308d;hpb=fc9a526c0ed9aed1c1c54698add871ade855175c;p=babeltrace.git diff --git a/plugins/ctf/fs/fs.h b/plugins/ctf/fs/fs.h index cf574c8b..2c0972e6 100644 --- a/plugins/ctf/fs/fs.h +++ b/plugins/ctf/fs/fs.h @@ -29,13 +29,14 @@ */ #include -#include +#include +#include "data-stream.h" -#define CTF_FS_COMPONENT_NAME "fs" #define CTF_FS_COMPONENT_DESCRIPTION \ "Component used to read a CTF trace located on a file system." -static bool ctf_fs_debug; +BT_HIDDEN +extern bool ctf_fs_debug; struct bt_notification_heap; @@ -59,6 +60,8 @@ struct ctf_fs_stream { struct bt_ctf_stream *stream; /* FIXME There should be many and ctf_fs_stream should not own them. */ struct bt_ctf_notif_iter *notif_iter; + /* A stream is assumed to be indexed. */ + struct index index; void *mmap_addr; /* Max length of chunk to mmap() when updating the current mapping. */ size_t mmap_max_len; @@ -78,6 +81,16 @@ struct ctf_fs_stream { struct ctf_fs_iterator { struct bt_notification_heap *pending_notifications; + struct bt_notification *current_notification; + /* + * struct ctf_fs_data_stream* which have not yet been associated to a + * bt_ctf_stream. The association is performed on the first packet + * read by the stream (since, at that point, we have read a packet + * header). + */ + GPtrArray *pending_streams; + /* bt_ctf_stream -> ctf_fs_stream */ + GHashTable *stream_ht; }; struct ctf_fs_component_options { @@ -88,10 +101,8 @@ struct ctf_fs_component { GString *trace_path; FILE *error_fp; size_t page_size; - struct bt_notification *current_notification; - struct ctf_fs_metadata metadata; struct ctf_fs_component_options options; - GPtrArray *streams; /* struct ctf_fs_data_stream * */ + struct ctf_fs_metadata *metadata; }; BT_HIDDEN