ctf: allocate some structures with new
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 24 Oct 2023 02:18:14 +0000 (22:18 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 28 Mar 2024 17:52:05 +0000 (13:52 -0400)
commitafb0f12beee7f3aa65156e27a76b627dfb3b52e1
tree7f9963892dc538425284f15634d3854cfbd3f43c
parenta745c1904cb9637f78e0f6d8a1927b2dd05db436
ctf: allocate some structures with new

Allocate some key structures in the ctf plugin with new (and free with
delete), so we can start using non-POD fields in them.  Initialize all
fields to 0 / nullptr to replicate what g_new0 did.

Add ctf_fs_ds_index_entry_destroy, to abstract how this object is
destroyed (it is currently being g_free'd at multiple places) and to use
it as a g_ptr_array_new_with_free_func callback.

Change-Id: Ic0f893655db22c964641639aa0625d820af71587
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8021
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12195
Tested-by: jenkins <jenkins@lttng.org>
20 files changed:
src/plugins/ctf/common/src/bfcr/bfcr.cpp
src/plugins/ctf/common/src/metadata/tsdl/ctf-meta-resolve.cpp
src/plugins/ctf/common/src/metadata/tsdl/decoder.cpp
src/plugins/ctf/common/src/metadata/tsdl/decoder.hpp
src/plugins/ctf/common/src/metadata/tsdl/visitor-generate-ir.cpp
src/plugins/ctf/common/src/msg-iter/msg-iter.cpp
src/plugins/ctf/fs-src/data-stream-file.cpp
src/plugins/ctf/fs-src/data-stream-file.hpp
src/plugins/ctf/fs-src/file.cpp
src/plugins/ctf/fs-src/fs.cpp
src/plugins/ctf/fs-src/fs.hpp
src/plugins/ctf/fs-src/metadata.cpp
src/plugins/ctf/fs-src/metadata.hpp
src/plugins/ctf/fs-src/query.cpp
src/plugins/ctf/lttng-live/data-stream.cpp
src/plugins/ctf/lttng-live/lttng-live.cpp
src/plugins/ctf/lttng-live/lttng-live.hpp
src/plugins/ctf/lttng-live/metadata.cpp
src/plugins/ctf/lttng-live/viewer-connection.cpp
src/plugins/ctf/lttng-live/viewer-connection.hpp
This page took 0.025977 seconds and 4 git commands to generate.