From 4d08698162f805114213c16b95a4d8d9c3fd52ef Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 23 Apr 2013 09:26:42 -0400 Subject: [PATCH] Move bt_handle to bt_trace_descriptor Signed-off-by: Mathieu Desnoyers --- formats/ctf/ctf.c | 2 +- formats/ctf/events.c | 4 ++-- include/babeltrace/ctf-ir/metadata.h | 2 -- include/babeltrace/format-internal.h | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index d24f1cb7..ddde5452 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -2103,7 +2103,7 @@ void ctf_set_handle(struct bt_trace_descriptor *descriptor, struct ctf_trace *td = container_of(descriptor, struct ctf_trace, parent); - td->handle = handle; + td->parent.handle = handle; } static diff --git a/formats/ctf/events.c b/formats/ctf/events.c index 1c4813da..3de5131d 100644 --- a/formats/ctf/events.c +++ b/formats/ctf/events.c @@ -309,8 +309,8 @@ int bt_ctf_event_get_handle_id(const struct bt_ctf_event *ctf_event) cfs = container_of(event->stream, const struct ctf_file_stream, parent); trace = cfs->parent.stream_class->trace; - if (trace->handle) - ret = trace->handle->id; + if (trace->parent.handle) + ret = trace->parent.handle->id; return ret; } diff --git a/include/babeltrace/ctf-ir/metadata.h b/include/babeltrace/ctf-ir/metadata.h index 482a8f02..4fa5c0be 100644 --- a/include/babeltrace/ctf-ir/metadata.h +++ b/include/babeltrace/ctf-ir/metadata.h @@ -217,8 +217,6 @@ struct ctf_trace { /* Heap of streams, ordered to always get the lowest timestamp */ struct ptr_heap *stream_heap; - - struct bt_trace_handle *handle; }; #define CTF_STREAM_SET_FIELD(ctf_stream, field) \ diff --git a/include/babeltrace/format-internal.h b/include/babeltrace/format-internal.h index a6509389..589b68a3 100644 --- a/include/babeltrace/format-internal.h +++ b/include/babeltrace/format-internal.h @@ -40,6 +40,7 @@ extern "C" { struct bt_trace_descriptor { char path[PATH_MAX]; /* trace path */ struct bt_context *ctx; + struct bt_trace_handle *handle; }; #ifdef __cplusplus -- 2.34.1