consumerd: refactor: split read_subbuf into sub-operations
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 10 May 2020 22:00:26 +0000 (18:00 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 26 May 2020 18:29:52 +0000 (14:29 -0400)
commit29d1a7ae5d5b46002e5883366a7b06f1d9dcc115
tree4c77f9f3d89e006ae9fe015cdd2330e4f4fa7299
parentf6dff2c3bdbcb392d629ee851eac70b054536fbd
consumerd: refactor: split read_subbuf into sub-operations

The read_subbuf code paths intertwine domain-specific operations and
metadata/data-specific logic which makes modifications error prone and
introduces a fair amount of code duplication.

lttng_consumer_read_subbuffer is effectively turned into a template
method invoking overridable callbacks making most of the consumption
logic domain and data/metadata agnostic.

The goal is not to extensively clean-up that code path. A follow-up
fix introduces metadata buffering logic which would not reasonably fit
in the current scheme. This clean-up makes it easier to safely
introduce those changes.

No changes in behaviour are intended by this change.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9366f2e2a38018ca9b617b93ad9259340180c55d
src/common/consumer/consumer-stream.c
src/common/consumer/consumer-stream.h
src/common/consumer/consumer.c
src/common/consumer/consumer.h
src/common/kernel-consumer/kernel-consumer.c
src/common/kernel-consumer/kernel-consumer.h
src/common/ust-consumer/ust-consumer.c
This page took 0.027128 seconds and 5 git commands to generate.