* case, the collection is not there, so we
* cannot print the timestamps.
*/
- if ((&file_stream->parent)->stream_class->trace->collection) {
+ if ((&file_stream->parent)->stream_class->trace->parent.collection) {
/*
* When a stream reaches the end of the
* file, we need to show the number of
field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
packet_index.timestamp_begin = bt_get_unsigned_int(field);
- if (file_stream->parent.stream_class->trace->collection) {
+ if (file_stream->parent.stream_class->trace->parent.collection) {
packet_index.timestamp_begin =
ctf_get_real_timestamp(
&file_stream->parent,
field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
packet_index.timestamp_end = bt_get_unsigned_int(field);
- if (file_stream->parent.stream_class->trace->collection) {
+ if (file_stream->parent.stream_class->trace->parent.collection) {
packet_index.timestamp_end =
ctf_get_real_timestamp(
&file_stream->parent,
{
uint64_t ts_nsec;
struct ctf_trace *trace = stream->stream_class->trace;
- struct trace_collection *tc = trace->collection;
+ struct trace_collection *tc = trace->parent.collection;
uint64_t tc_offset;
if (tc->clock_use_offset_avg)
GHashTable *clocks;
GHashTable *callsites;
struct ctf_clock *single_clock; /* currently supports only one clock */
- struct trace_collection *collection; /* Container of this trace */
GPtrArray *event_declarations; /* Array of all the struct bt_ctf_event_decl */
struct declaration_struct *packet_header_decl;
#include <limits.h>
#include <babeltrace/context-internal.h>
+#include <babeltrace/babeltrace-internal.h>
#ifdef __cplusplus
extern "C" {
char path[PATH_MAX]; /* trace path */
struct bt_context *ctx;
struct bt_trace_handle *handle;
+ struct trace_collection *collection; /* Container of this trace */
};
#ifdef __cplusplus
}
g_ptr_array_add(tc->array, td);
- trace->collection = tc;
+ trace->parent.collection = tc;
{
struct clock_match clock_match = {