Re: [lttng-dev] [PATCH lttng-tools] Fix: getenv can return null

2019-05-01 Thread Jérémie Galarneau
Merged in master and stable-2.11. Thanks! Jérémie On Tue, Apr 30, 2019 at 07:09:24PM -0400, Jonathan Rajotte wrote: > On system with LANG not defined getenv will return null. > > An example of such system is the lava runner used by ci.lttng.org. > > https://ci.lttng.org/view/System%20Tests/ >

[lttng-dev] [RFC PATCH lttng-tools v2 09/20] Add serdes functions for lttng_channel

2019-05-01 Thread Yannick Lamarre
Since those structs are only transferred across unix sockets, endianness is kept in host order. Signed-off-by: Yannick Lamarre --- 1) Fixed spelling errors 2) Added missing break (This code was copied from XXX hence it would be missing from there too) 3) Fixed coding style with declaration (mo

[lttng-dev] [RFC PATCH lttng-tools v2 11/20] Add serialized versions of lttng_event_context structs

2019-05-01 Thread Yannick Lamarre
Serialized versions of lttng_event_context and lttng_event_perf_counter_ctx are packed structures to be used in communication protocols for consistent sizes across platforms. The serialized versions are stripped of pointers and padding. Pointers are removed since their size can vary across process

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

2019-05-01 Thread Yannick Lamarre
Here's a broad description of changes from v1: 1) Removed mentions of big endian storage in jgalar patch since they're obsolete 2) Changed commit titles to specify targeted structs 3) Fixed reported spelling errors 4) Added missing asserts in serdes functions 5) Fixed reported coding style issue

[lttng-dev] [RFC PATCH lttng-tools v2 12/20] Add serdes functions for lttng_event_context

2019-05-01 Thread Yannick Lamarre
Since those structs are only transferred across unix sockets, endianness is kept in host order. Signed-off-by: Yannick Lamarre --- Fixed spelling errors src/common/sessiond-comm/sessiond-comm.c | 42 src/common/sessiond-comm/sessiond-comm.h | 1 + 2 files chang

[lttng-dev] [RFC PATCH lttng-tools v2 10/20] Integrate serialized communication for lttng_channel

2019-05-01 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_channel. Signed-off-by: Yannick Lamarre --- Reworded commit title to better identify changes in patch. src/bin/lttng-sessiond/client.c | 10 +++--- src/common/sessiond-comm/sessiond-comm.h | 4 ++--

[lttng-dev] [RFC PATCH lttng-tools v2 13/20] Integrate serialized communication for lttng_event_context

2019-05-01 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_event_context. Signed-off-by: Yannick Lamarre --- Fixed coding style issue by adding an empty line between variable declaration and code. include/lttng/event-internal.h | 4 src/bin/lttng-sessiond

[lttng-dev] [RFC PATCH lttng-tools v2 04/20] Clean-up: Switch enum fields in lttcomm_consumer_status_channel

2019-05-01 Thread Yannick Lamarre
Size of an enum type is not guaranteed by the C spec, which is why the field's tpye is replaced to uin32_t. Signed-off-by: Yannick Lamarre --- src/common/sessiond-comm/sessiond-comm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/sessiond-comm/sessiond-comm.h b/

[lttng-dev] [RFC PATCH lttng-tools v2 14/20] Add serialized versions of lttng_event structs

2019-05-01 Thread Yannick Lamarre
Serialized versions of lttng_event, lttng_event_function_attr and lttng_event_probe_attr are packed structures to be used in communication protocols for consistent sizes across platforms. The serialized versions are stripped of pointers and padding. Pointers are removed since their size can vary a

[lttng-dev] [RFC PATCH lttng-tools v2 15/20] Add serdes functions for lttng_event

2019-05-01 Thread Yannick Lamarre
Since those structs are only transferred across unix sockets, endianness is kept in host order. Signed-off-by: Yannick Lamarre --- Fixed spelling errors include/lttng/event-internal.h | 6 ++ src/common/sessiond-comm/sessiond-comm.c | 118 +++ 2 files cha

[lttng-dev] [RFC PATCH lttng-tools v2 01/20] Fix: Use platform-independant types in sessiond to consumerd communication

2019-05-01 Thread Yannick Lamarre
From: Jérémie Galarneau The session daemon to consumer daemon is passin around the lttcomm_consumer_msg structure which contains a relayd_sock structure. This structure, in turn, contains a lttcomm_relayd_sock structure which contains an lttcomm_sock structure. If you're still following, this l

[lttng-dev] [RFC PATCH lttng-tools v2 16/20] Integrate serialized communication for lttng_event

2019-05-01 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_event. Signed-off-by: Yannick Lamarre --- 1) Reworded commit title 2) Removed empty line prior variable declaration 3) Changed the awkward nested conditions by switch statements src/bin/lttng-sessiond/client.c

[lttng-dev] [RFC PATCH lttng-tools v2 17/20] Add serialized versions of lttng_snapshot_output structs

2019-05-01 Thread Yannick Lamarre
Serialized version of lttng_snapshot_output is a packed structure to be used in communication protocols for consistent size across platforms. The serialized version is stripped of pointers and padding. Pointers are removed since their size can vary across processes on platforms supporting multiple

[lttng-dev] [RFC PATCH lttng-tools v2 18/20] Add serdes functions for lttng_snapshot_output

2019-05-01 Thread Yannick Lamarre
Since those structs are only transferred across unix sockets, endianness is kept in host order. Signed-off-by: Yannick Lamarre --- 1) Fixed spelling errors 2) Added missing asserts include/lttng/snapshot-internal.h| 3 +++ src/common/sessiond-comm/sessiond-comm.c | 30 +

[lttng-dev] [RFC PATCH lttng-tools v2 19/20] Integrate serialized communication for lttng_snapshot_output

2019-05-01 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_snapshot_output. Signed-off-by: Yannick Lamarre --- 1) Reworded commit title 2) Fixed spelling error in structure name 3) Fixed coding style issue with index declaration 4) Changed index type to more appropriate si

[lttng-dev] [RFC PATCH lttng-tools v2 06/20] Clean-up: Removed deprecated field

2019-05-01 Thread Yannick Lamarre
The command using this field was dropped in 2.9, but the field was left in the union. Signed-off-by: Yannick Lamarre --- src/common/sessiond-comm/sessiond-comm.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.

[lttng-dev] [RFC PATCH lttng-tools v2 20/20] Introduce serialization unit test

2019-05-01 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- New unit test for serialization functions. .gitignore | 1 + tests/unit/Makefile.am | 8 +- .../unit/test_utils_sessiond_comm_serialization.c | 290 + 3 files changed,

[lttng-dev] [RFC PATCH lttng-tools v2 02/20] Clean-up: Switch enum fields in lttcomm_consumer_msg

2019-05-01 Thread Yannick Lamarre
Size of an enum type is not guaranteed by the C spec, which is why the field's tpye is replaced to uin32_t. Signed-off-by: Yannick Lamarre --- src/common/sessiond-comm/sessiond-comm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/sessiond-comm/sessiond-comm.h

[lttng-dev] [RFC PATCH lttng-tools v2 05/20] Clean-up: Remove unused structure

2019-05-01 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/sessiond-comm/sessiond-comm.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index 84d87808..f9f6f97b 100644 --- a/src/common/sessiond-comm/sessi

[lttng-dev] [RFC PATCH lttng-tools v2 07/20] Document inter-proccesses communication protocols requirements

2019-05-01 Thread Yannick Lamarre
The introduction of serialization changes previously established requirements for lttng-tools. This document drafts the guidelines to follow in future communication protocol development. Signed-off-by: Yannick Lamarre --- Unsure how this document should be structured and what specific information

[lttng-dev] [RFC PATCH lttng-tools v2 03/20] Clean-up: Switch enum fields in lttcomm_consumer_status_msg

2019-05-01 Thread Yannick Lamarre
Size of an enum type is not guaranteed by the C spec, which is why the field's tpye is replaced to uin32_t. Signed-off-by: Yannick Lamarre --- src/common/sessiond-comm/sessiond-comm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/sessiond-comm/sessiond-comm.h b/

[lttng-dev] [RFC PATCH lttng-tools v2 08/20] Add serialized versions of lttng_channel structs

2019-05-01 Thread Yannick Lamarre
Serialized versions of lttng_channel and lttng_channel_extended are packed structures to be used in communication protocols for consistent sizes across platforms. The serialized versions are stripped of pointers and padding. Pointers are removed since their size can vary across processes on platfo