[lttng-dev] [PATCH barectf 1/1] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-14 Thread Mathieu Desnoyers
bitfield.h uses the left shift operator with a left operand which may be negative. The C99 standard states that shifting a negative value is undefined. When building with -Wshift-negative-value, we get this gcc warning: In file included from /home/smarchi/src/babeltrace/include/babeltrace/ctfser

[lttng-dev] [PATCH lttng-modules 1/2] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-14 Thread Mathieu Desnoyers
bitfield.h uses the left shift operator with a left operand which may be negative. The C99 standard states that shifting a negative value is undefined. When building with -Wshift-negative-value, we get this gcc warning: In file included from /home/smarchi/src/babeltrace/include/babeltrace/ctfser

[lttng-dev] [PATCH lttng-modules 2/2] Silence compiler "always false comparison" warning

2019-05-14 Thread Mathieu Desnoyers
Compiling the bitfield test with gcc -Wextra generates those warnings: ../../include/babeltrace/bitfield-internal.h:38:45: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] #define _bt_is_signed_type(type) ((type) -1 < (type) 0) This is the intent of the macro. Dis

[lttng-dev] [PATCH lttng-ust 2/2] Silence compiler "always false comparison" warning

2019-05-14 Thread Mathieu Desnoyers
Compiling the bitfield test with gcc -Wextra generates those warnings: ../../include/babeltrace/bitfield-internal.h:38:45: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] #define _bt_is_signed_type(type) ((type) -1 < (type) 0) This is the intent of the macro. Dis

[lttng-dev] [PATCH lttng-ust 1/2] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-14 Thread Mathieu Desnoyers
bitfield.h uses the left shift operator with a left operand which may be negative. The C99 standard states that shifting a negative value is undefined. When building with -Wshift-negative-value, we get this gcc warning: In file included from /home/smarchi/src/babeltrace/include/babeltrace/ctfser

[lttng-dev] [PATCH babeltrace 4/4] Cleanup: test_bitfield: pass source integers as parameters

2019-05-14 Thread Mathieu Desnoyers
It is a good practice to pass arguments as parameters rather than through global variables. Signed-off-by: Mathieu Desnoyers Change-Id: I0d7cc94b1d492ca53ad29b1d39831ee6288b2672 --- tests/lib/test_bitfield.c | 85 +-- 1 file changed, 30 insertions(+),

[lttng-dev] [PATCH babeltrace 3/4] Extend test_bitfield coverage

2019-05-14 Thread Mathieu Desnoyers
test_bitfield was mainly testing various write unit size. Add variations of read unit size as well. Previously, the test was only covering input from a 32-bit integer. Additionally test source and destination of 64-bit. Signed-off-by: Mathieu Desnoyers Change-Id: Ic2b7849140e04fe7cca3de576e31bfe

[lttng-dev] [PATCH babeltrace 1/4] Fix: bitfield: shift undefined/implementation defined behaviors (v6)

2019-05-14 Thread Mathieu Desnoyers
bitfield.h uses the left shift operator with a left operand which may be negative. The C99 standard states that shifting a negative value is undefined. When building with -Wshift-negative-value, we get this gcc warning: In file included from /home/smarchi/src/babeltrace/include/babeltrace/ctfser

[lttng-dev] [PATCH babeltrace 2/4] Silence compiler "always false comparison" warning

2019-05-14 Thread Mathieu Desnoyers
Compiling the bitfield test with gcc -Wextra generates those warnings: ../../include/babeltrace/bitfield-internal.h:38:45: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] #define _bt_is_signed_type(type) ((type) -1 < (type) 0) This is the intent of the macro. Dis

Re: [lttng-dev] lttng-tools-2.10.6: Spawning consumerd failed

2019-05-14 Thread Jonathan Rajotte-Julien
> > > > > > > I'm running under a 32 bit (x86) vanilla, 4.9.20 kernel with busybox > > with the following lttng versions: I took some time to at least test on a 32 bit system (buildroot) just in case and everything seems to be working fine on a base installation. The log from lttng-sessiond sh

Re: [lttng-dev] [PATCH v5 babeltrace 1/1] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-14 Thread Simon Marchi
On 2019-05-13 4:20 p.m., Mathieu Desnoyers wrote: > bitfield.h uses the left shift operator with a left operand which > may be negative. The C99 standard states that shifting a negative > value is undefined. > > When building with -Wshift-negative-value, we get this gcc warning: > > In file inclu

Re: [lttng-dev] lttng-tools-2.10.6: Spawning consumerd failed

2019-05-14 Thread Jonathan Rajotte-Julien
Hi, On Tue, May 14, 2019 at 03:20:31PM +0300, Zvi Vered wrote: > Hello, > > I ran the following command on the target (where my kernel is running): > > ~ # ./lttng create my-kernel-session --output=/tmp/my-kernel-trace > > and then: > > > ~ # ./lttng enable-event --kernel --syscall open,close

[lttng-dev] lttng-tools-2.10.6: Spawning consumerd failed

2019-05-14 Thread Zvi Vered
Hello, I ran the following command on the target (where my kernel is running): ~ # ./lttng create my-kernel-session --output=/tmp/my-kernel-trace and then: ~ # ./lttng enable-event --kernel --syscall open,close and got: Error: Spawning consumerd failed Error: Event open: Kernel consumer star