pos->last_cycles_timestamp = stream->cycles_timestamp;
}
- if ((opt_trace_field || opt_all_fields) && stream_class->trace->path[0] != '\0') {
+ if ((opt_trace_field || opt_all_fields) && stream_class->trace->parent.path[0] != '\0') {
set_field_names_print(pos, ITEM_HEADER);
if (pos->print_names) {
fprintf(pos->fp, "trace = ");
}
- fprintf(pos->fp, "%s", stream_class->trace->path);
+ fprintf(pos->fp, "%s", stream_class->trace->parent.path);
if (pos->print_names)
fprintf(pos->fp, ", ");
else
}
fprintf(fp, "] in trace UUID ");
print_uuid(fp, stream->stream_class->trace->uuid);
- if (stream->stream_class->trace->path[0])
+ if (stream->stream_class->trace->parent.path[0])
fprintf(fp, ", at path: \"%s\"",
- stream->stream_class->trace->path);
+ stream->stream_class->trace->parent.path);
fprintf(fp, ", within stream id %" PRIu64, stream->stream_id);
if (stream->path[0])
ret = -errno;
goto error_dirfd;
}
- strncpy(td->path, path, sizeof(td->path));
- td->path[sizeof(td->path) - 1] = '\0';
+ strncpy(td->parent.path, path, sizeof(td->parent.path));
+ td->parent.path[sizeof(td->parent.path) - 1] = '\0';
/*
* Keep the metadata file separate.
babeltrace/clock-internal.h \
babeltrace/compiler.h \
babeltrace/context-internal.h \
+ babeltrace/format-internal.h \
babeltrace/iterator-internal.h \
babeltrace/trace-collection.h \
babeltrace/prio_heap.h \
#include <babeltrace/types.h>
#include <babeltrace/format.h>
+#include <babeltrace/format-internal.h>
#include <babeltrace/ctf/types.h>
#include <sys/types.h>
#include <dirent.h>
struct ctf_trace {
struct bt_trace_descriptor parent;
+
/* root scope */
struct declaration_scope *root_declaration_scope;
/* Heap of streams, ordered to always get the lowest timestamp */
struct ptr_heap *stream_heap;
- char path[PATH_MAX];
struct bt_context *ctx;
struct bt_trace_handle *handle;
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/types.h>
#include <babeltrace/format.h>
+#include <babeltrace/format-internal.h>
/*
* Inherit from both struct bt_stream_pos and struct bt_trace_descriptor.
--- /dev/null
+#ifndef _BABELTRACE_FORMAT_INTERNAL_H
+#define _BABELTRACE_FORMAT_INTERNAL_H
+
+/*
+ * BabelTrace
+ *
+ * Trace Format Internal Header
+ *
+ * Copyright 2010-2013 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <limits.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Parent trace descriptor */
+struct bt_trace_descriptor {
+ char path[PATH_MAX]; /* trace path */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BABELTRACE_FORMAT_INTERNAL_H */
struct bt_stream_pos;
struct bt_context;
struct bt_trace_handle;
-
-/* Parent trace descriptor */
-struct bt_trace_descriptor {
-};
+struct bt_trace_descriptor;
struct bt_mmap_stream {
int fd;