* Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
*/
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
#define BT_COMP_LOG_SELF_COMP (self_comp)
#define BT_LOG_OUTPUT_LEVEL (log_level)
#define BT_LOG_TAG "PLUGIN/SRC.CTF.FS/DS"
#include "logging/comp-logging.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <inttypes.h>
-#include "compat/mman.h"
+#include "common/assert.h"
#include "compat/endian.h"
-#include <babeltrace2/babeltrace.h>
-#include "common/common.h"
-#include "file.hpp"
-#include "metadata.hpp"
+#include "compat/mman.h"
+
#include "../common/msg-iter/msg-iter.hpp"
-#include "common/assert.h"
#include "data-stream-file.hpp"
-#include <string.h>
+#include "file.hpp"
+#include "fs.hpp"
+#include "lttng-index.hpp"
+#include "plugins/ctf/common/metadata/ctf-meta.hpp"
static inline size_t remaining_mmap_bytes(struct ctf_fs_ds_file *ds_file)
{
BT_ASSERT(ds_file->mmap_len > 0);
ds_file->mmap_addr =
- bt_mmap((void *) 0, ds_file->mmap_len, PROT_READ, MAP_PRIVATE, fileno(ds_file->file->fp),
+ bt_mmap(ds_file->mmap_len, PROT_READ, MAP_PRIVATE, fileno(ds_file->file->fp),
ds_file->mmap_offset_in_file, ds_file->log_level);
if (ds_file->mmap_addr == MAP_FAILED) {
BT_COMP_LOGE("Cannot memory-map address (size %zu) of file \"%s\" (%p) at offset %jd: %s",
return status;
}
-static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t stream_id, void *data)
+static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t, void *data)
{
struct ctf_fs_ds_file *ds_file = (struct ctf_fs_ds_file *) data;
bt_stream_class *ds_file_stream_class;
return ds_file_mmap(ds_file, offset);
}
-BT_HIDDEN
struct ctf_msg_iter_medium_ops ctf_fs_ds_file_medops = {
medop_request_bytes,
medop_seek,
return status;
}
-BT_HIDDEN
void ctf_fs_ds_group_medops_data_destroy(struct ctf_fs_ds_group_medops_data *data)
{
if (!data) {
goto end;
}
-BT_HIDDEN
struct ctf_fs_ds_file *ctf_fs_ds_file_create(struct ctf_fs_trace *ctf_fs_trace, bt_stream *stream,
const char *path, bt_logging_level log_level)
{
return ds_file;
}
-BT_HIDDEN
struct ctf_fs_ds_index *ctf_fs_ds_file_build_index(struct ctf_fs_ds_file *ds_file,
struct ctf_fs_ds_file_info *file_info,
struct ctf_msg_iter *msg_iter)
return index;
}
-BT_HIDDEN
struct ctf_fs_ds_index *ctf_fs_ds_index_create(bt_logging_level log_level,
bt_self_component *self_comp)
{
return index;
}
-BT_HIDDEN
void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *ds_file)
{
if (!ds_file) {
g_free(ds_file);
}
-BT_HIDDEN
void ctf_fs_ds_index_destroy(struct ctf_fs_ds_index *index)
{
if (!index) {