[lttng-dev] [RFC PATCH lttng-tools] RFC: Add POPT_CFLAGS to lttng_CFLAGS

2019-02-15 Thread Yannick Lamarre
The generated makefile was ignoring POPT_CFLAGS when compiling lttng, but was adding POPT_LIBS to lttng_LDADD. With this commit, make now honors both settings for applications and tests. Fixes: #1165 Signed-off-by: Yannick Lamarre --- src/bin/lttng/Makefile.am | 2 ++ tests

[lttng-dev] [RFC PATCH lttng-tools] RFC: Enforce DL_LIBS value instead of hard coded -ldl

2019-02-15 Thread Yannick Lamarre
Generated makefiles would ignore DL_LIBS value selected by configure script and use the hard coded value -ldl. Generated makefiles will now use DL_LIBS. Refs: #1165 Signed-off-by: Yannick Lamarre --- src/common/testpoint/Makefile.am | 2 +- tests/regression/ust/baddr

[lttng-dev] [PATCH lttng-tools] Fix typo

2019-02-15 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..ad5bca21 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -177,7 +177,7

[lttng-dev] [PATCH lttng-tools v2 1/2] Fix: lttng_poll_mod calls compat_(e)poll_add

2019-02-18 Thread Yannick Lamarre
lttng_poll_mod should call compat_(e)poll_mod. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..fde54ddb 100644 --- a/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v2 2/2] Fix typo

2019-02-18 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb..ad5bca21 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -356,7 +356,7

Re: [lttng-dev] [PATCH lttng-tools] Fix typo

2019-02-18 Thread Yannick Lamarre
Forget about this patch, here is v2 [1]. [1] https://lists.lttng.org/pipermail/lttng-dev/2019-February/028528.html - Original Message - From: "Yannick Lamarre" To: lttng-dev@lists.lttng.org Cc: jga...@efficios.com Sent: Friday, February 15, 2019 4:14:23 PM Subject: [lttng-d

[lttng-dev] [PATCH lttng-tools v2 1/2] RFC: Add POPT_CFLAGS to lttng_CFLAGS

2019-02-18 Thread Yannick Lamarre
The generated makefile was ignoring POPT_CFLAGS when compiling lttng, but was adding POPT_LIBS to lttng_LDADD. With this commit, make now honors both settings for applications and tests. Refs: #1165 Signed-off-by: Yannick Lamarre --- src/bin/lttng/Makefile.am | 2 ++ tests

[lttng-dev] [PATCH lttng-tools v2 2/2] RFC: Enforce DL_LIBS value instead of hard coded -ldl

2019-02-18 Thread Yannick Lamarre
Generated makefiles would ignore DL_LIBS value selected by configure script and use the hard coded value -ldl. Generated makefiles will now use DL_LIBS. Refs: #1165 Signed-off-by: Yannick Lamarre --- src/common/testpoint/Makefile.am | 2 +- tests/regression/ust/baddr

[lttng-dev] [PATCH lttng-tools 2/2] RFC: Enforce DL_LIBS value instead of hard coded -ldl

2019-02-22 Thread Yannick Lamarre
Generated makefiles would ignore DL_LIBS value selected by configure script and use the hard coded value -ldl. Generated makefiles will now use DL_LIBS. Refs: #1165 Signed-off-by: Yannick Lamarre --- src/common/testpoint/Makefile.am | 2 +- tests/regression/ust/baddr

[lttng-dev] [PATCH lttng-tools 1/2] Fix: Add POPT_CFLAGS to lttng_CFLAGS

2019-02-22 Thread Yannick Lamarre
The generated makefile was ignoring POPT_CFLAGS when compiling lttng, but was adding POPT_LIBS to lttng_LDADD. With this commit, make now honors both settings for applications and tests. Fixes: #1165 Signed-off-by: Yannick Lamarre --- src/bin/lttng/Makefile.am | 2 ++ tests

[lttng-dev] [PATCH lttng-tools v3 1/2] Fix: Add POPT_CFLAGS to lttng_CFLAGS

2019-02-22 Thread Yannick Lamarre
The generated makefile was ignoring POPT_CFLAGS when compiling lttng, but was adding POPT_LIBS to lttng_LDADD. With this commit, make now honors both settings for applications and tests. Fixes: #1165 Signed-off-by: Yannick Lamarre --- src/bin/lttng/Makefile.am | 2 ++ tests

[lttng-dev] [PATCH lttng-tools v3 2/2] Enforce DL_LIBS value instead of hard coded -ldl

2019-02-22 Thread Yannick Lamarre
Generated makefiles would ignore DL_LIBS value selected by configure script and use the hard coded value -ldl. Generated makefiles will now use DL_LIBS. Refs: #1165 Signed-off-by: Yannick Lamarre --- src/common/testpoint/Makefile.am | 2 +- tests/regression/ust/baddr

[lttng-dev] [PATCH lttng-tools 1/8] Fix: lttng_poll_mod calls compat_(e)poll_add

2019-03-19 Thread Yannick Lamarre
lttng_poll_mod should call compat_(e)poll_mod. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..fde54ddb 100644 --- a/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools 0/8] Change in poll compat layer

2019-03-19 Thread Yannick Lamarre
This patch set fixes previously unreported bug in the poll/epoll compatibility layer. It adds a unit test to the same compatibility layer and a few behaviour changes to the poll flavor to match the epoll flavor. Yannick Lamarre (8): Fix: lttng_poll_mod calls compat_(e)poll_add Add Unit test

[lttng-dev] [PATCH lttng-tools 3/8] Change LTTNG_POLL_GETNB behaviour for poll flavor

2019-03-19 Thread Yannick Lamarre
: Yannick Lamarre --- src/common/compat/poll.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb..7dd8741b 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -315,10 +315,14 @@ static inline

[lttng-dev] [PATCH lttng-tools 5/8] Fix hang in thread_rotation when using compat-poll

2019-03-19 Thread Yannick Lamarre
The poll flavor of the lttng_poll api requires the caller to verify which of the fd has really waken the thread from wait. This verification was missing and a blocking read was made on an empty fd. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/rotation-thread.c | 4 1 file

[lttng-dev] [PATCH lttng-tools 2/8] Add Unit test to poll compatibility layer

2019-03-19 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- .gitignore | 1 + tests/unit/Makefile.am | 9 +- tests/unit/test_utils_compat_poll.c | 246 3 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 tests/unit

[lttng-dev] [PATCH lttng-tools 8/8] Fix typo

2019-03-19 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index a8a08d9e..4272374c 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -361,7 +361,7

[lttng-dev] [PATCH lttng-tools 4/8] Adapt poll layer behaviour to match the epoll layer

2019-03-19 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 28 ++-- src/common/compat/poll.h| 1 + 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index b45b39dc

[lttng-dev] [PATCH lttng-tools 6/8] Change lttng_poll_wait behaviour of compat-poll to match compat-epoll

2019-03-19 Thread Yannick Lamarre
This removes the need to verify for eventless file descriptors and mitigates risks of bug due to behaviour mismatch. Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/common

[lttng-dev] [PATCH lttng-tools 7/8] Clean code base from redundant verification

2019-03-19 Thread Yannick Lamarre
Removed redundant verification for file descriptors with 0 revents in code code base now that lttng_poll_wait presents the FDs à la epoll. Signed-off-by: Yannick Lamarre --- src/bin/lttng-consumerd/health-consumerd.c | 5 - src/bin/lttng-relayd/health-relayd.c | 5 - src/bin

[lttng-dev] [PATCH lttng-tools] Fix: use strcmp instead of strncmp for full match cases

2019-03-20 Thread Yannick Lamarre
Except for a single case where the compared string is not ended with '\0', strncmp was replaced by strcmp in cases where a full string match was required. The exception was fixed with a length comparison prior the strncmp call. Fixes: #987 Signed-off-by: Yannick Lamarre --- src

[lttng-dev] [PATCH lttng-tools] Add test cases for options sanitizing

2019-03-20 Thread Yannick Lamarre
Test cases now covers options that require full string matches which were previously missing. Signed-off-by: Yannick Lamarre --- tests/regression/kernel/test_channel | 24 ++- .../regression/tools/snapshots/test_ust_streaming | 46 +- tests/regression

[lttng-dev] [PATCH lttng-tools v2] Fix: lttng_poll_mod calls compat_(e)poll_add

2019-03-21 Thread Yannick Lamarre
lttng_poll_mod should call compat_(e)poll_mod. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..fde54ddb 100644 --- a/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v2] Adapt poll layer behaviour to match the epoll layer

2019-03-21 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 28 ++-- src/common/compat/poll.h| 1 + 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index b45b39dc

[lttng-dev] [PATCH lttng-tools v2] Fix hang in thread_rotation when using compat-poll

2019-03-21 Thread Yannick Lamarre
Add missing verification to prevent a blocking read on an empty fd. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/rotation-thread.c | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index

[lttng-dev] [PATCH lttng-tools v2] Change lttng_poll_wait behaviour of compat-poll to match compat-epoll

2019-03-21 Thread Yannick Lamarre
This removes the need to verify for eventless file descriptors and mitigates risks of bug due to behaviour mismatch. Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 33 ++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src

[lttng-dev] [PATCH lttng-tools v2] Fix typo

2019-03-21 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d2826b7a..c7bd0606 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -359,7 +359,7

[lttng-dev] [PATCH lttng-tools v2] Add Unit test to poll compatibility layer

2019-03-21 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- .gitignore | 1 + tests/unit/Makefile.am | 9 +- tests/unit/test_utils_compat_poll.c | 236 3 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 tests/unit

[lttng-dev] [PATCH lttng-tools v2] Change LTTNG_POLL_GETNB behaviour for poll flavor

2019-03-21 Thread Yannick Lamarre
implementations. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb..5eb7ff9c 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v2] Clean code base from redundant verification

2019-03-21 Thread Yannick Lamarre
Remove redundant verification for file descriptors with 0 revents in code base. Signed-off-by: Yannick Lamarre --- src/bin/lttng-consumerd/health-consumerd.c | 5 - src/bin/lttng-relayd/health-relayd.c | 5 - src/bin/lttng-relayd/live.c | 10 -- src

[lttng-dev] [PATCH lttng-tools v3 1/8] Fix: lttng_poll_mod calls compat_(e)poll_add

2019-03-22 Thread Yannick Lamarre
lttng_poll_mod should call compat_(e)poll_mod. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..fde54ddb 100644 --- a/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v3 5/8] Fix hang in thread_rotation when using compat-poll

2019-03-22 Thread Yannick Lamarre
Add missing verification to prevent a blocking read on an empty fd. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/rotation-thread.c | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index

[lttng-dev] [PATCH lttng-tools v3 2/8] Add Unit test to poll compatibility layer

2019-03-22 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- .gitignore | 1 + tests/unit/Makefile.am | 9 +- tests/unit/test_utils_compat_poll.c | 236 3 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 tests/unit

[lttng-dev] [PATCH lttng-tools v3 7/8] Clean code base from redundant verification

2019-03-22 Thread Yannick Lamarre
Remove redundant verification for file descriptors with 0 revents in code base. Signed-off-by: Yannick Lamarre --- src/bin/lttng-consumerd/health-consumerd.c | 5 - src/bin/lttng-relayd/health-relayd.c | 5 - src/bin/lttng-relayd/live.c | 10 -- src

[lttng-dev] [PATCH lttng-tools v3 3/8] Change LTTNG_POLL_GETNB behaviour for poll flavor

2019-03-22 Thread Yannick Lamarre
implementations. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb..5eb7ff9c 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v3 6/8] Change lttng_poll_wait behaviour of compat-poll to match compat-epoll

2019-03-22 Thread Yannick Lamarre
This removes the need to verify for idle file descriptors and mitigates risks of bug due to behaviour mismatch. Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/src

[lttng-dev] [PATCH lttng-tools v3 4/8] Adapt poll layer behaviour to match the epoll layer

2019-03-22 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index b45b39dc..be655728 100644 --- a/src/common/compat/compat

[lttng-dev] [PATCH lttng-tools v3 8/8] Fix typo

2019-03-22 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index 5eb7ff9c..d7020f36 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -358,7 +358,7

Re: [lttng-dev] [PATCH lttng-tools v2] Change lttng_poll_wait behaviour of compat-poll to match compat-epoll

2019-03-25 Thread Yannick Lamarre
Alright, I'll remove the assert for v4. - Original Message - From: "Mathieu Desnoyers" To: "Jeremie Galarneau" Cc: "Yannick Lamarre" , "lttng-dev" , "jgalar" Sent: Monday, March 25, 2019 11:56:11 AM Subject: Re: [lttng-dev] [PAT

[lttng-dev] [PATCH lttng-tools] Fix: Properly sanitize input parameter

2019-03-26 Thread Yannick Lamarre
The lttng client uses the sizeof the containing buffer for input string sanitation instead of libc defined macro. Signed-off-by: Yannick Lamarre --- lttng-enable_channel was improperly verifying user input and wrongly rejected valid input. src/bin/lttng/commands/enable_channels.c | 2 +- 1

[lttng-dev] [PATCH lttng-tools v2] Fix: Properly sanitize input parameter

2019-03-26 Thread Yannick Lamarre
containing buffer for the channel's name. This patch also fixes potential buffer overflow caused by an improperly bounded strcpy in the case where NAME_MAX would have been greater than LTTNG_SYMBOL_NAME_LEN. Signed-off-by: Yannick Lamarre --- src/bin/lttng/commands/enable_channels.c | 2 +- 1

Re: [lttng-dev] Fwd: LTTng user space data not flushed out

2019-03-28 Thread Yannick Lamarre
Hi TSK, >From [1]: You must provide the following items for the bug to be reproducible: * Component(s) involved : [ https://bugs.lttng.org/projects/lttng-tools | LTTng-tools ] , [ https://bugs.lttng.org/projects/lttng-ust | LTTng-UST ] , [ https://bugs.lttng.org/projects/lttng-modules |

[lttng-dev] [PATCH lttng-tools] Clean-up: Remove double buffer initialisation

2019-03-28 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/lib/lttng-ctl/lttng-ctl.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 165fef4d..92634c00 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng

[lttng-dev] [PATCH lttng-tools v4 3/8] Change LTTNG_POLL_GETNB behaviour for poll flavor

2019-04-01 Thread Yannick Lamarre
implementations. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb..5eb7ff9c 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v4 0/8] Change in poll compat layer

2019-04-01 Thread Yannick Lamarre
The v4 patch set addresses all comments on v3 by removing the assert in compat_poll_wait. Yannick Lamarre (8): Fix: lttng_poll_mod calls compat_(e)poll_add Add Unit test to poll compatibility layer Change LTTNG_POLL_GETNB behaviour for poll flavor Adapt poll layer behaviour to match the

[lttng-dev] [PATCH lttng-tools v4 2/8] Add Unit test to poll compatibility layer

2019-04-01 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- .gitignore | 1 + tests/unit/Makefile.am | 9 +- tests/unit/test_utils_compat_poll.c | 236 3 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 tests/unit

[lttng-dev] [PATCH lttng-tools v4 8/8] Fix typo

2019-04-01 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index 5eb7ff9c..d7020f36 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -358,7 +358,7

[lttng-dev] [PATCH lttng-tools v4 5/8] Fix hang in thread_rotation when using compat-poll

2019-04-01 Thread Yannick Lamarre
Add missing verification to prevent a blocking read on an empty fd. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/rotation-thread.c | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index

[lttng-dev] [PATCH lttng-tools v4 7/8] Clean code base from redundant verification

2019-04-01 Thread Yannick Lamarre
Remove redundant verification for file descriptors with 0 revents in code base. Signed-off-by: Yannick Lamarre --- src/bin/lttng-consumerd/health-consumerd.c | 5 - src/bin/lttng-relayd/health-relayd.c | 5 - src/bin/lttng-relayd/live.c | 10 -- src

[lttng-dev] [PATCH lttng-tools v4 1/8] Fix: lttng_poll_mod calls compat_(e)poll_add

2019-04-01 Thread Yannick Lamarre
lttng_poll_mod should call compat_(e)poll_mod. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..fde54ddb 100644 --- a/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v4 6/8] Change lttng_poll_wait behaviour of compat-poll to match compat-epoll

2019-04-01 Thread Yannick Lamarre
This removes the need to verify for idle file descriptors and mitigates risks of bug due to behaviour mismatch. Signed-off-by: Yannick Lamarre --- The assert in the for loop is removed. src/common/compat/compat-poll.c | 37 + 1 file changed, 33 insertions

[lttng-dev] [PATCH lttng-tools v4 4/8] Adapt poll layer behaviour to match the epoll layer

2019-04-01 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index b45b39dc..be655728 100644 --- a/src/common/compat/compat

Re: [lttng-dev] Forum - Using liblttng-ctl

2019-04-05 Thread Yannick Lamarre
Hi Ryan While this function "exists" in 2.11, it's part of the internal librairy and shouldn't be used. lttng_enable_channel does exactly what you want and is part of the exposed API both in 2.9n and 2.11. Regards, YL From: "CaptainWonka ." To: "lttng-dev" Sent: Friday, April 5, 2019 11

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

2019-04-18 Thread Yannick Lamarre
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_ch

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

2019-04-18 Thread Yannick Lamarre
off-by: Jérémie Galarneau Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/consumer.c| 5 +- src/common/kernel-consumer/kernel-consumer.c | 11 +- src/common/sessiond-comm/sessiond-comm.c | 186 +++ src/common/sessiond-comm/sessiond-comm.h | 111 +

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

2019-04-18 Thread Yannick Lamarre
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 b/src/common/sessiond-comm/sessiond-comm.h index 556c277f..43a57736 100644 --- a/src/common/sessiond-comm

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

2019-04-18 Thread Yannick Lamarre
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/src/common/sessiond-comm/sessiond-comm.h index 43a57736..1324f0b3 100644 --- a/src/common/sessiond-comm

[lttng-dev] [RFC PATCH lttng-tools 09/18] Integrate serialized communication in lttng-ctl and sessiond

2019-04-18 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_channel. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/client.c | 9 ++--- src/common/sessiond-comm/sessiond-comm.h | 4 ++-- src/lib/lttng-ctl/lttng-ctl.c| 24

[lttng-dev] [RFC PATCH lttng-tools 10/18] Add serialized versions of lttng_event_context structs

2019-04-18 Thread Yannick Lamarre
supporting variable sized registers (x86-64). Padding is also removed since it defeats the purpose of a packed struct. Signed-off-by: Yannick Lamarre --- include/lttng/event-internal.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/lttng/event-internal.h b/include/lttng

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

2019-04-18 Thread Yannick Lamarre
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/src/common/sessiond-comm/sessiond-comm.h index 1324f0b3..92cab8e6 100644 --- a/src/common/sessiond-comm

[lttng-dev] [RFC PATCH lttng-tools 11/18] Add serdes functions for lttng_event_context

2019-04-18 Thread Yannick Lamarre
Since those structs are only transfered across unix sockets, endianess is kept in host order. Signed-off-by: Yannick Lamarre --- src/common/sessiond-comm/sessiond-comm.c | 42 src/common/sessiond-comm/sessiond-comm.h | 1 + 2 files changed, 43 insertions

[lttng-dev] [RFC PATCH lttng-tools 12/18] Integrate serialized communication in lttng-ctl and sessiond

2019-04-18 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_event_context. Signed-off-by: Yannick Lamarre --- include/lttng/event-internal.h | 4 src/bin/lttng-sessiond/client.c | 16 +--- src/common/sessiond-comm/sessiond-comm.h | 2

[lttng-dev] [RFC PATCH lttng-tools 13/18] Add serialized versions of lttng_event structs

2019-04-18 Thread Yannick Lamarre
on platforms supporting variable sized registers (x86-64). Padding is also removed since it defeats the purpose of a packed struct. Signed-off-by: Yannick Lamarre --- include/lttng/event-internal.h | 38 ++ 1 file changed, 38 insertions(+) diff --git a/include

[lttng-dev] [RFC PATCH lttng-tools 14/18] Add serdes functions for lttng_event_context

2019-04-18 Thread Yannick Lamarre
Since those structs are only transfered across unix sockets, endianess is kept in host order. Signed-off-by: Yannick Lamarre --- include/lttng/event-internal.h | 6 ++ src/common/sessiond-comm/sessiond-comm.c | 116 +++ 2 files changed, 122 insertions

[lttng-dev] [RFC PATCH lttng-tools 15/18] Integrate serialized communication in lttng-ctl and sessiond

2019-04-18 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_event. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/client.c | 23 --- src/common/sessiond-comm/sessiond-comm.h | 4 ++-- src/lib/lttng-ctl/lttng-ctl.c| 14

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

2019-04-18 Thread Yannick Lamarre
Since those structs are only transfered across unix sockets, endianess is kept in host order. Signed-off-by: Yannick Lamarre --- include/lttng/snapshot-internal.h| 3 +++ src/common/sessiond-comm/sessiond-comm.c | 28 2 files changed, 31 insertions(+) diff

[lttng-dev] [RFC PATCH lttng-tools 16/18] Add serialized versions of lttng_event structs

2019-04-18 Thread Yannick Lamarre
(x86-64). Padding is also removed since it defeats the purpose of a packed struct. Signed-off-by: Yannick Lamarre --- include/lttng/snapshot-internal.h | 8 1 file changed, 8 insertions(+) diff --git a/include/lttng/snapshot-internal.h b/include/lttng/snapshot-internal.h index

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

2019-04-18 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 92cab8e6..eb5d8ecb 100644 --- a/src/common/sessiond-comm

[lttng-dev] [RFC PATCH lttng-tools 18/18] Integrate serialized communication in lttng-ctl and sessiond

2019-04-18 Thread Yannick Lamarre
lttng-ctl and lttng-sessiond use serialized communication for messages using lttng_snapshot_out. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/client.c | 27 ++- src/common/sessiond-comm/sessiond-comm.h | 4 ++-- src/lib/lttng-ctl/snapshot.c

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

2019-04-18 Thread Yannick Lamarre
The command using this command 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

[lttng-dev] [RFC PATCH lttng-tools 08/18] Add serdes functions for lttng_channel

2019-04-18 Thread Yannick Lamarre
Since those structs are only transfered across unix sockets, endianess is kept in host order. Signed-off-by: Yannick Lamarre --- include/lttng/channel-internal.h | 5 ++ src/common/sessiond-comm/sessiond-comm.c | 105 +++ 2 files changed, 110 insertions

[lttng-dev] [RFC PATCH lttng-tools 07/18] Add serialized versions of lttng_channel structs

2019-04-18 Thread Yannick Lamarre
variable sized registers (x86-64). Padding is also removed since it defeats the purpose of a packed struct. Signed-off-by: Yannick Lamarre --- include/lttng/channel-internal.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/lttng/channel-internal.h b

[lttng-dev] [PATCH lttng-tools v5 1/8] Fix: lttng_poll_mod calls compat_(e)poll_add

2019-04-25 Thread Yannick Lamarre
lttng_poll_mod should call compat_(e)poll_mod. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..fde54ddb 100644 --- a/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v5 0/8] Change in poll compat layer

2019-04-25 Thread Yannick Lamarre
This revision adresses issues raised on v4. Changes between versions are listed in there own patch. Yannick Lamarre (8): Fix: lttng_poll_mod calls compat_(e)poll_add Add Unit test to poll compatibility layer Change LTTNG_POLL_GETNB behaviour for poll flavor Adapt poll layer behaviour to

[lttng-dev] [PATCH lttng-tools v5 2/8] Add Unit test to poll compatibility layer

2019-04-25 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- File uses space indentation instead. Added space between operator and operand (for typecasting). Empty line in variables declaration removed. Replaced reset by init for lttng_poll_init test. Removed empty line at the end of function. .gitignore

[lttng-dev] [PATCH lttng-tools v5 5/8] Fix hang in thread_rotation when using compat-poll

2019-04-25 Thread Yannick Lamarre
Add missing verification to prevent a blocking read on an empty fd. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/rotation-thread.c | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index

[lttng-dev] [PATCH lttng-tools v5 4/8] Adapt poll layer behaviour to match the epoll layer

2019-04-25 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- Removed trailing trailing whitespace in comments. src/common/compat/compat-poll.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index

[lttng-dev] [PATCH lttng-tools v5 3/8] Change LTTNG_POLL_GETNB behaviour for poll flavor

2019-04-25 Thread Yannick Lamarre
implementations. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb..5eb7ff9c 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v5 6/8] Change lttng_poll_wait behaviour of compat-poll to match compat-epoll

2019-04-25 Thread Yannick Lamarre
This removes the need to verify for idle file descriptors and mitigates risks of bug due to behaviour mismatch. Signed-off-by: Yannick Lamarre --- Iterator declaration moved to the begining of function. src/common/compat/compat-poll.c | 38 ++ 1 file changed

[lttng-dev] [PATCH lttng-tools v5 7/8] Clean code base from redundant verification

2019-04-25 Thread Yannick Lamarre
Remove redundant verification for file descriptors with 0 revents in code base. Signed-off-by: Yannick Lamarre --- src/bin/lttng-consumerd/health-consumerd.c | 5 - src/bin/lttng-relayd/health-relayd.c | 5 - src/bin/lttng-relayd/live.c | 10 -- src

[lttng-dev] [PATCH lttng-tools v5 8/8] Fix typo

2019-04-25 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index 5eb7ff9c..d7020f36 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -358,7 +358,7

[lttng-dev] [PATCH lttng-tools v6 0/8] Change in compat (e)poll

2019-04-25 Thread Yannick Lamarre
>From v5, fixed compilation problem in unit test and changed the title of some commits. Yannick Lamarre (8): Fix: lttng_poll_mod calls compat_(e)poll_add Add Unit test to poll compatibility layer Change LTTNG_POLL_GETNB behaviour for poll flavor Adapt poll layer behaviour to match

[lttng-dev] [PATCH lttng-tools v6 3/8] Change LTTNG_POLL_GETNB behaviour for poll flavor

2019-04-25 Thread Yannick Lamarre
implementations. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index fde54ddb..5eb7ff9c 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v6 7/8] Clean code base from redundant verification

2019-04-25 Thread Yannick Lamarre
Remove redundant verification for file descriptors with 0 revents in code base. Signed-off-by: Yannick Lamarre --- src/bin/lttng-consumerd/health-consumerd.c | 5 - src/bin/lttng-relayd/health-relayd.c | 5 - src/bin/lttng-relayd/live.c | 10 -- src

[lttng-dev] [PATCH lttng-tools v6 1/8] Fix: lttng_poll_mod calls compat_(e)poll_add

2019-04-25 Thread Yannick Lamarre
lttng_poll_mod should call compat_(e)poll_mod. Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index d4bd87f5..fde54ddb 100644 --- a/src/common/compat/poll.h

[lttng-dev] [PATCH lttng-tools v6 2/8] Add Unit test to poll compatibility layer

2019-04-25 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- .gitignore | 1 + tests/unit/Makefile.am | 9 +- tests/unit/test_utils_compat_poll.c | 233 3 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 tests/unit

[lttng-dev] [PATCH lttng-tools v6 4/8] Adapt poll layer behaviour to match the epoll layer

2019-04-25 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index b45b39dc..2318920a 100644 --- a/src/common/compat/compat

[lttng-dev] [PATCH lttng-tools v6 5/8] Fix: hang in thread_rotation when using compat-poll

2019-04-25 Thread Yannick Lamarre
Add missing verification to prevent a blocking read on an empty fd. Signed-off-by: Yannick Lamarre --- src/bin/lttng-sessiond/rotation-thread.c | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index

[lttng-dev] [PATCH lttng-tools v6 8/8] Clean-up: correct typo from epoll to poll

2019-04-25 Thread Yannick Lamarre
Signed-off-by: Yannick Lamarre --- src/common/compat/poll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index 5eb7ff9c..d7020f36 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -358,7 +358,7

[lttng-dev] [PATCH lttng-tools v6 6/8] Change lttng_poll_wait behaviour of compat-poll to match compat-epoll

2019-04-25 Thread Yannick Lamarre
This removes the need to verify for idle file descriptors and mitigates risks of bug due to behaviour mismatch. Signed-off-by: Yannick Lamarre --- src/common/compat/compat-poll.c | 38 ++ 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/src

[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

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

2019-05-01 Thread Yannick Lamarre
processes on platforms supporting multiple pointer sizes (32bits vs 64bits) and this creates mismatches in structure sizes. Padding is also removed since it defeats the purpose of a packed struct and is not used to extend the protocols. Signed-off-by: Yannick Lamarre --- Reworded commit message to

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

2019-05-01 Thread Yannick Lamarre
dditionnal comments. Jérémie Galarneau (1): Fix: Use platform-independant types in sessiond to consumerd communication Yannick Lamarre (19): Clean-up: Switch enum fields in lttcomm_consumer_msg Clean-up: Switch enum fields in lttcomm_consumer_status_msg Clean-up: Switch enum

[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

[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

[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

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

2019-05-01 Thread Yannick Lamarre
across processes on platforms supporting multiple pointer sizes (32bits vs 64bits) and this creates mismatches in structure sizes. Padding is also removed since it defeats the purpose of a packed struct and is not used to extend the protocols. Signed-off-by: Yannick Lamarre --- Reworded commit

[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

  1   2   >