[lttng-dev] [RFC PATCH lttng-tools 00/18] Improvements in sessiond-comm

Yannick Lamarre ylamarre at efficios.com
Thu Apr 18 12:18:32 EDT 2019


This patch introduces serialized communication between lttng-ctl,
lttng-sessiond and consumerd. It builds on [1] as a style guide while patching
it to accomodate changes in the code since 2014. Each new group of serialized 
structs is introduced in three patches. The first defines the serialized
struct, the second adds the required functions to serialize and deserialize
the structures and the third modifies lttng-ctl and lttng-sessiond to use the
serialized structures in communication.

This patch also cleans up the various structs defining communication protocols
by changing field with an enum type to uint32_t. This is to better guarantee
the struct's size.

Considering that a few functions are not used in the code base, a unit test is
to be introduced to cover those functions.

[1] https://github.com/jgalar/lttng-tools/commit/ab64247103355a5af0634e5fde499b9f465baadc

Jérémie Galarneau (1):
  Fix: Use platform-independant types in sessiond to consumerd
    communication

Yannick Lamarre (17):
  Clean-up: Switch enum fields in lttcomm_consumer_msg
  Clean-up: Switch enum fields in lttcomm_consumer_status_msg
  Clean-up: Switch enum fields in lttcomm_consumer_status_channel
  Clean-up: Remove unused structure
  Clean-up: Removed deprecated field
  Add serialized versions of lttng_channel structs
  Add serdes functions for lttng_channel
  Integrate serialized communication in lttng-ctl and sessiond
  Add serialized versions of lttng_event_context structs
  Add serdes functions for lttng_event_context
  Integrate serialized communication in lttng-ctl and sessiond
  Add serialized versions of lttng_event structs
  Add serdes functions for lttng_event_context
  Integrate serialized communication in lttng-ctl and sessiond
  Add serialized versions of lttng_event structs
  Add serdes functions for lttng_snapshot_output
  Integrate serialized communication in lttng-ctl and sessiond

 include/lttng/channel-internal.h             |  35 ++
 include/lttng/event-internal.h               |  59 ++++
 include/lttng/snapshot-internal.h            |  11 +
 src/bin/lttng-sessiond/client.c              |  75 ++++-
 src/bin/lttng-sessiond/consumer.c            |   5 +-
 src/common/kernel-consumer/kernel-consumer.c |  11 +-
 src/common/sessiond-comm/sessiond-comm.c     | 477 +++++++++++++++++++++++++++
 src/common/sessiond-comm/sessiond-comm.h     | 150 +++++++--
 src/common/ust-consumer/ust-consumer.c       |  11 +-
 src/lib/lttng-ctl/lttng-ctl.c                |  50 +--
 src/lib/lttng-ctl/snapshot.c                 |  24 +-
 tests/regression/tools/live/Makefile.am      |   2 +-
 tests/unit/Makefile.am                       |   6 +-
 13 files changed, 819 insertions(+), 97 deletions(-)

-- 
2.11.0



More information about the lttng-dev mailing list