babeltrace.git
9 years agoPort: Set required compiler flags to use pthreads
Michael Jeanson [Wed, 7 Oct 2015 19:35:46 +0000 (15:35 -0400)] 
Port: Set required compiler flags to use pthreads

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Add configure check for __attribute__ support
Michael Jeanson [Wed, 7 Oct 2015 19:33:34 +0000 (15:33 -0400)] 
Port: Add configure check for __attribute__ support

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: cleanup and portability fix to configure.ac
Michael Jeanson [Wed, 7 Oct 2015 19:23:18 +0000 (15:23 -0400)] 
Port: cleanup and portability fix to configure.ac

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Add support for linkers with no support for 'no-as-needed'
Alexis Martin [Thu, 1 Oct 2015 20:12:25 +0000 (16:12 -0400)] 
Port: Add support for linkers with no support for 'no-as-needed'

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Add compat for platforms with no MSG_NOSIGNAL or SO_NOSIGPIPE
Michael Jeanson [Mon, 28 Sep 2015 15:53:19 +0000 (11:53 -0400)] 
Port: Add compat for platforms with no MSG_NOSIGNAL or SO_NOSIGPIPE

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Add AX_LIB_SOCKET_NSL macro to configure.ac
Michael Jeanson [Mon, 28 Sep 2015 15:42:50 +0000 (11:42 -0400)] 
Port: Add AX_LIB_SOCKET_NSL macro to configure.ac

This is required on platforms that need extra libraries to
link socket programs.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Replace bzero() by memset()
Michael Jeanson [Mon, 28 Sep 2015 14:50:54 +0000 (10:50 -0400)] 
Port: Replace bzero() by memset()

bzero() was deprecated in POSIX 2001 and removed from POSIX 2008,
while memset() is part of standard C.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Add dummy.c to libcompat
Michael Jeanson [Mon, 28 Sep 2015 14:26:50 +0000 (10:26 -0400)] 
Port: Add dummy.c to libcompat

The BSD 'ar' command won't accept an empty file list, add a dummy c file.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: uname can return a positive value on success
Michael Jeanson [Fri, 16 Oct 2015 18:57:30 +0000 (14:57 -0400)] 
Port: uname can return a positive value on success

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Replace NAME_MAX by MAXNAMLEN
Michael Jeanson [Mon, 28 Sep 2015 14:13:27 +0000 (10:13 -0400)] 
Port: Replace NAME_MAX by MAXNAMLEN

MAXNAMLEN is defined on Linux, Solaris and BSD

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoChange UUID API prefix from babeltrace_ to bt_
Jérémie Galarneau [Tue, 13 Oct 2015 20:36:56 +0000 (16:36 -0400)] 
Change UUID API prefix from babeltrace_ to bt_

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Add Solaris libuuid compat
Michael Jeanson [Mon, 28 Sep 2015 12:26:00 +0000 (08:26 -0400)] 
Port: Add Solaris libuuid compat

Solaris libuuid lack const qualifiers, add compat functions.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: Add Solaris endian.h compat
Michael Jeanson [Tue, 6 Oct 2015 16:09:02 +0000 (12:09 -0400)] 
Port: Add Solaris endian.h compat

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPort: make bootstrap script work on most shell
Michael Jeanson [Tue, 6 Oct 2015 16:08:00 +0000 (12:08 -0400)] 
Port: make bootstrap script work on most shell

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: posix_fallocate() returns int > 0 on errors
Michael Jeanson [Tue, 13 Oct 2015 16:13:11 +0000 (12:13 -0400)] 
Fix: posix_fallocate() returns int > 0 on errors

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: babeltrace-log packet seek
Mathieu Desnoyers [Tue, 13 Oct 2015 16:06:26 +0000 (12:06 -0400)] 
Fix: babeltrace-log packet seek

Packet seek has been removed from ctf helper headers somewhere around
Babeltrace 1.1. Since then, babeltrace-log is broken when it needs to
output a file larger than the fixed-sized packet (WRITE_PACKET_LEN
currently defined as (getpagesize() * 8 * CHAR_BIT).

Correctly handle the non-zero return values on ctf_align_pos() and
ctf_move_pos() on the dummy position copy, which are used to validate
whether we need to switch packet or not. Also add an initial packet seek
at the beginning of the file.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: make check in OOT build with absolute path
Michael Jeanson [Fri, 4 Sep 2015 21:23:12 +0000 (17:23 -0400)] 
Fix: make check in OOT build with absolute path

The previous patch fixed the out of tree build when the configure script
was called with a path relative to the builddir but still failed when
the path was absolute. This works with both.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: make check in out of tree build
Michael Jeanson [Thu, 3 Sep 2015 18:13:21 +0000 (14:13 -0400)] 
Fix: make check in out of tree build

Use the tracefiles from the source dir when running make check in an out
of tree builddir.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: 32bit values index_major/minor used as 64bit
Michael Jeanson [Tue, 18 Aug 2015 19:39:41 +0000 (15:39 -0400)] 
Fix: 32bit values index_major/minor used as 64bit

This patch fixes compiler warnings on big endian architectures where
be64toh() is a nop and returns the original type.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoHide the packet_seq_num field
Julien Desfossez [Mon, 3 Aug 2015 15:35:38 +0000 (11:35 -0400)] 
Hide the packet_seq_num field

The packet_seq_num is a new field in LTTng 2.8 that should be hidden
from the ctf-text output as it is not really relevant for the users of
the text output.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoBuild: Update m4 for bison & flex version check to match autoconf-archive file
Jonathan Rajotte [Fri, 10 Jul 2015 15:36:45 +0000 (11:36 -0400)] 
Build: Update m4 for bison & flex version check to match autoconf-archive file

Officials m4 were merged in [1][2].

[1] https://github.com/peti/autoconf-archive/commit/b2bdd8591b2d6b1eb580ead5f978a30e3ecfc36c
[2] https://github.com/peti/autoconf-archive/commit/fd1f2862c1524e73495d67646d26000e2e85e807

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoBuild: add version check on flex
Jonathan Rajotte [Thu, 2 Jul 2015 22:20:25 +0000 (18:20 -0400)] 
Build: add version check on flex

This new m4 macro is valid starting from [1].

[1]http://sourceforge.net/p/flex/flex/ci/712c03b38fb35f9d7f16e0fdd27441c3efda0071/tree/

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoBuild: add version check on autoconf
Jonathan Rajotte [Thu, 2 Jul 2015 19:50:20 +0000 (15:50 -0400)] 
Build: add version check on autoconf

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoBuild: m4 macro for Bison version check
Jonathan Rajotte [Thu, 2 Jul 2015 19:12:31 +0000 (15:12 -0400)] 
Build: m4 macro for Bison version check

This new m4 macro make check for a supported version of Bison.
This macro is valid starting from commit id
e79137accc7ea0352cd4677ff22818f9c68d4eab of the GNU Bison git tree[1].
This check works for version 1.29b to this day.

[1] http://git.savannah.gnu.org/cgit/bison.git/commit/?id=e79137accc7ea0352cd4677ff22818f9c68d4eab

Fixes: #891
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing postfix_expression DOT keywords in CTF grammar
Jérémie Galarneau [Thu, 2 Jul 2015 18:46:06 +0000 (14:46 -0400)] 
Fix: Missing postfix_expression DOT keywords in CTF grammar

This would cause expressions of the form:

uint32_t a[stream.event.header.seq_len]

to fail to parse since two keywords (stream and event) are used in the
path.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: handle 64-bit trace IDs on 32-bit systems
Mathieu Desnoyers [Mon, 26 Jan 2015 22:29:26 +0000 (17:29 -0500)] 
Fix: handle 64-bit trace IDs on 32-bit systems

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: print format type mismatch warnings on 32-bit
Mathieu Desnoyers [Mon, 26 Jan 2015 22:08:08 +0000 (17:08 -0500)] 
Fix: print format type mismatch warnings on 32-bit

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: missing parenthesis in offset_align_floor
Mathieu Desnoyers [Fri, 16 Jan 2015 16:30:44 +0000 (11:30 -0500)] 
Fix: missing parenthesis in offset_align_floor

Is currently unused. Triggers a compile error when used.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: allow empty CTF files
Mathieu Desnoyers [Mon, 5 Jan 2015 02:17:30 +0000 (21:17 -0500)] 
Fix: allow empty CTF files

There are expected situtations in which CTF producers (like LTTng) can
generate empty CTF trace files. The current babeltrace behavior is to
trigger an error when an empty file is encountered. Change this to allow
reading the rest of the trace anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: Incorrect variant tag validation
Jérémie Galarneau [Fri, 12 Dec 2014 04:01:30 +0000 (23:01 -0500)] 
Fix: Incorrect variant tag validation

An erroneous tag validation causes bt_ctf_field_variant_get_field() to
fail when called a second time on a given variant field.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: sanity check in iterator creation
Julien Desfossez [Tue, 18 Nov 2014 17:52:32 +0000 (12:52 -0500)] 
Fix: sanity check in iterator creation

This function is part of the public API; we need more
sanity checks before using the structures provided by the caller.

Refs: #827

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: iterate manually over each live trace to add to catch errors
Julien Desfossez [Tue, 18 Nov 2014 17:52:31 +0000 (12:52 -0500)] 
Fix: iterate manually over each live trace to add to catch errors

Instead of using g_hash_table_foreach, we now control the iteration over
the hash table, so we can handle properly the errors.
For now, if there is an error for any trace, we consider this a fatal
issue and exit.

We could allow the process to continue and only skip the problematic
traces, but we will wait until this becomes a real use-case.

Fixes: #827
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoDetect Python packages directory on configure
Jérémie Galarneau [Thu, 16 Oct 2014 20:36:10 +0000 (16:36 -0400)] 
Detect Python packages directory on configure

The Python interpreter on Debian is configurated to use
...lib/python.../dist-packages instead of
.../lib/python.../site-packages to look for extra modules.

python_modules.m4 performs a runtime python check of the
sys.path variable to check wether the selected interpreter is
configurated to use site-packages vs dist-packages.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoVersion 1.2.4 v1.2.4
Mathieu Desnoyers [Tue, 4 Nov 2014 19:17:20 +0000 (14:17 -0500)] 
Version 1.2.4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: make sure we can exit the get_new_metadata loop
Julien Desfossez [Fri, 31 Oct 2014 19:18:00 +0000 (15:18 -0400)] 
Fix: make sure we can exit the get_new_metadata loop

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
10 years agoDocs fix: Change bt_ctf_writer_create_stream return description
Jérémie Galarneau [Thu, 16 Oct 2014 21:46:53 +0000 (17:46 -0400)] 
Docs fix: Change bt_ctf_writer_create_stream return description

writer -> stream

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: offset_s and CTF clocks with frequency != 1GHz
Mathieu Desnoyers [Thu, 2 Oct 2014 19:23:46 +0000 (15:23 -0400)] 
Fix: offset_s and CTF clocks with frequency != 1GHz

Take into account offset_s from the clock description when calculating
the tc_offset in ctf_get_real_timestamp().

Do not assume that the single_clock->offset field is at a frequency of
1GHz. Take into account the its clock frequency.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoVersion 1.2.3 v1.2.3
Mathieu Desnoyers [Tue, 23 Sep 2014 16:45:08 +0000 (12:45 -0400)] 
Version 1.2.3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: incorrect compiler warning
Mathieu Desnoyers [Tue, 23 Sep 2014 16:24:07 +0000 (12:24 -0400)] 
Fix: incorrect compiler warning

The compiler does not see that *target will necessarily set the values.
Initialize the variables to 0 to silence uninitialized variable warning.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Don't assume that PROT_WRITE grants read permissions
Jérémie Galarneau [Mon, 22 Sep 2014 16:59:11 +0000 (12:59 -0400)] 
Fix: Don't assume that PROT_WRITE grants read permissions

The prot flag passed to mmap() is set to PROT_WRITE when the O_RDWR
access flags is used. This assumes that PROT_WRITE grants read
permissions on the mmap'ed region. While this is true on x86, this
causes a segmentation fault on SPARC and, presumably, other
architectures implementing strict access permissions.

CTF Writer needs read permissions since the unaligned integer writes
may use load instructions as the value is read back to perform the
required shifting/masking is performed in the _bt_bitfield_write_*
macros.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: align objstack on 8 bytes
Mathieu Desnoyers [Wed, 17 Sep 2014 18:56:04 +0000 (14:56 -0400)] 
Fix: align objstack on 8 bytes

Architectures such as sparc32 have 32-bit pointers, but require
alignment on 8 bytes multiples for 64-bit integers.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix Python: Add a comment warning about an API limitation
Jérémie Galarneau [Mon, 18 Aug 2014 22:33:33 +0000 (18:33 -0400)] 
Fix Python: Add a comment warning about an API limitation

Add a comment warning about a possible misuse of the events()
API. The objects returned by this function shall not be copied
as they become invalid as soon as the next event is accessed.

It is also invalid to access an event after its generator has
gone out of scope.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoUse BABELTRACE_HOST_NAME_MAX in test_ctf_writer.c
Jérémie Galarneau [Thu, 7 Aug 2014 16:25:35 +0000 (12:25 -0400)] 
Use BABELTRACE_HOST_NAME_MAX in test_ctf_writer.c

This fixes the build on FreeBSD.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Conflicts:
tests/lib/test_ctf_writer.c

10 years agoAdd limits compatibility header
Jérémie Galarneau [Thu, 7 Aug 2014 16:24:45 +0000 (12:24 -0400)] 
Add limits compatibility header

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: don't perform unaligned integer read/writes
Mathieu Desnoyers [Wed, 16 Jul 2014 14:58:48 +0000 (10:58 -0400)] 
Fix: don't perform unaligned integer read/writes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Align buffers from objstack_alloc on sizeof(void *)
Fredrik Markström [Fri, 16 May 2014 02:10:38 +0000 (10:10 +0800)] 
Fix: Align buffers from objstack_alloc on sizeof(void *)

The buffers from objstack_alloc will store pointers, so they must
be aligned on a pointer's size, or else it will cause issues on the
CPUs which do not support unaligned addresses access.

Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: bt_ctf_field_type_structure_add_field argument validation
Jérémie Galarneau [Tue, 29 Jul 2014 20:55:36 +0000 (16:55 -0400)] 
Fix: bt_ctf_field_type_structure_add_field argument validation

bt_ctf_field_type_structure_add_field is not setting the return
value to a negative value if the parameter validation fails. The
function would abort while appearing to have succeeded.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoVersion 1.2.2 v1.2.2
Mathieu Desnoyers [Tue, 22 Jul 2014 18:59:50 +0000 (14:59 -0400)] 
Version 1.2.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Support out of tree builds in babeltrace
Lars Persson [Wed, 12 Mar 2014 07:12:46 +0000 (08:12 +0100)] 
Fix: Support out of tree builds in babeltrace

Signed-off-by: Lars Persson <larper@axis.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: mmap trace read the stream_id from the first packet
Julien Desfossez [Mon, 14 Jul 2014 21:11:31 +0000 (17:11 -0400)] 
Fix: mmap trace read the stream_id from the first packet

We were hardcoding the stream_id as 0 for mmap traces, causing a
problem for live traces with multiple channels.
A fix enters in lttng-tools v2.4.2 to send the CTF stream id in the beacon
packets, but until then, we cannot support traces with multiple CTF
streams (LTTng channels).

Fixes: #811
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: check the lttng-relayd protocol version
Julien Desfossez [Mon, 14 Jul 2014 21:11:30 +0000 (17:11 -0400)] 
Fix: check the lttng-relayd protocol version

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: don't update the trace collection if no new streams were received
Julien Desfossez [Mon, 14 Jul 2014 21:11:29 +0000 (17:11 -0400)] 
Fix: don't update the trace collection if no new streams were received

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix (Python bindings): Return a string if a sequence's element are chars
Jérémie Galarneau [Thu, 26 Jun 2014 14:42:00 +0000 (10:42 -0400)] 
Fix (Python bindings): Return a string if a sequence's element are chars

An AttributeError exception was raised when accessing the value property
of a sequence that contains a string.

Reported-by: Yiyang Dai <daiyiyang@hotmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: don't use a return code in _bt_ctf_stream_append_discarded_events
Sebastian Andrzej Siewior [Tue, 27 May 2014 08:08:13 +0000 (10:08 +0200)] 
Fix: don't use a return code in _bt_ctf_stream_append_discarded_events

That function is defined as void:
| File "/usr/lib/python3/dist-packages/babeltrace.py", line 2284, in
| append_discarded_events
| if ret < 0:
| TypeError: unorderable types: NoneType() < int()

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: Report the sequence's length field's value as length
Jérémie Galarneau [Wed, 21 May 2014 15:38:08 +0000 (11:38 -0400)] 
Fix: Report the sequence's length field's value as length

bt_ctf_get_field_list currently returns the underlying array's
size which is always the highest element count encountered to
date.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: Variable name typo in SequenceField and Event classes
Jérémie Galarneau [Fri, 25 Apr 2014 13:22:33 +0000 (09:22 -0400)] 
Fix: Variable name typo in SequenceField and Event classes

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix python: remove weird char at the end of line
Julien Desfossez [Tue, 15 Apr 2014 18:28:23 +0000 (14:28 -0400)] 
Fix python: remove weird char at the end of line

There was the character \xc2 at the end of one line that caused an
import error on some ubuntu distros.

Reported-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
10 years agoFix: add missing files to gitignore
Mathieu Desnoyers [Tue, 18 Mar 2014 17:53:03 +0000 (13:53 -0400)] 
Fix: add missing files to gitignore

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: ctf-text: add missing double-quotes around enum tag
Mathieu Desnoyers [Sat, 15 Mar 2014 16:31:47 +0000 (12:31 -0400)] 
Fix: ctf-text: add missing double-quotes around enum tag

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Add missing lttng_live_should_quit checks
Jérémie Galarneau [Mon, 10 Mar 2014 22:03:24 +0000 (18:03 -0400)] 
Fix: Add missing lttng_live_should_quit checks

Missing should_quit checks can cause the live plugin to
report errors on exit.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: Report errors occuring in lttng_live_read
Jérémie Galarneau [Mon, 10 Mar 2014 18:11:07 +0000 (14:11 -0400)] 
Fix: Report errors occuring in lttng_live_read

The lttng-live plugin does not return an error code when trying
to open a live trace that is already opened by another client.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoVersion 1.2.1 v1.2.1
Mathieu Desnoyers [Sat, 8 Mar 2014 13:59:02 +0000 (08:59 -0500)] 
Version 1.2.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Accept an input port in the live URL when no session is provided
Jérémie Galarneau [Mon, 3 Mar 2014 16:27:29 +0000 (11:27 -0500)] 
Fix: Accept an input port in the live URL when no session is provided

Fixes a regression introduced @ 2a6d197b310 which causes Babeltrace
to not list sessions if the live URL contains a port and complain
that a port number is not provided after the ":" delimiter.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoVersion 1.2.0 v1.2.0
Mathieu Desnoyers [Fri, 28 Feb 2014 18:12:39 +0000 (13:12 -0500)] 
Version 1.2.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: lttng-live parse url port check
Mathieu Desnoyers [Fri, 28 Feb 2014 13:08:29 +0000 (08:08 -0500)] 
Fix: lttng-live parse url port check

Ensure there is a port number after the ':' delimitor.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoVersion 1.2.0-rc2 v1.2.0-rc2
Mathieu Desnoyers [Thu, 27 Feb 2014 17:53:58 +0000 (12:53 -0500)] 
Version 1.2.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: events discarded timing inaccuracy
Mathieu Desnoyers [Tue, 25 Feb 2014 22:36:11 +0000 (17:36 -0500)] 
Fix: events discarded timing inaccuracy

Introduce babeltrace_ctf_console_output too, to ensure we only print
discarded events when a text output is used.

Fixes #589

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Move offset endianness conversion to get_data_packet
Jérémie Galarneau [Tue, 25 Feb 2014 20:47:39 +0000 (15:47 -0500)] 
Fix: Move offset endianness conversion to get_data_packet

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: Remove negative comparison to unsigned value
Jérémie Galarneau [Tue, 25 Feb 2014 20:40:42 +0000 (15:40 -0500)] 
Fix: Remove negative comparison to unsigned value

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: Uninitialized scalar variable
Jérémie Galarneau [Tue, 25 Feb 2014 20:13:18 +0000 (15:13 -0500)] 
Fix: Uninitialized scalar variable

Defect Reported-by: Coverity Scan

** CID 1187497:  Uninitialized scalar variable  (UNINIT)
/formats/lttng-live/lttng-live-comm.c: 753 in get_data_packet()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: Don't assert on metadata generation failure
Jérémie Galarneau [Mon, 24 Feb 2014 15:30:50 +0000 (10:30 -0500)] 
Fix: Don't assert on metadata generation failure

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: add missing SIGTERM and SIGINT handler
Mathieu Desnoyers [Tue, 25 Feb 2014 16:26:14 +0000 (11:26 -0500)] 
Fix: add missing SIGTERM and SIGINT handler

Handle expected signals gracefully: stop processing at cancellation
points expected by the protocol, so the relay daemon does not print
error messages when clients quit gracefully.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Reverse incorrect error message argument order
Mathieu Desnoyers [Tue, 25 Feb 2014 16:08:54 +0000 (11:08 -0500)] 
Fix: Reverse incorrect error message argument order

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup: add brackets to lttng-live-plugin.c
Mathieu Desnoyers [Tue, 25 Feb 2014 16:25:25 +0000 (11:25 -0500)] 
Cleanup: add brackets to lttng-live-plugin.c

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup lttng-live: add brackets in lttng_live_read()
Mathieu Desnoyers [Tue, 25 Feb 2014 15:53:47 +0000 (10:53 -0500)] 
Cleanup lttng-live: add brackets in lttng_live_read()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup lttng-live: 80 columns wrapping
Mathieu Desnoyers [Tue, 25 Feb 2014 15:51:43 +0000 (10:51 -0500)] 
Cleanup lttng-live: 80 columns wrapping

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: handle new streams in get_data_packet()
Mathieu Desnoyers [Tue, 25 Feb 2014 15:48:13 +0000 (10:48 -0500)] 
Fix: handle new streams in get_data_packet()

- don't skip ask_new_streams() if new metadata _and_
  new streams are available.
- goto retry after getting new streams.
- Add missing "ret = 0" assignment at the end of the function. Takes
  care of "possible use of uninitialized variables" warnings in the
  caller given by gcc.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: accept empty metadata on append
Mathieu Desnoyers [Mon, 24 Feb 2014 18:23:54 +0000 (13:23 -0500)] 
Fix: accept empty metadata on append

"Append" should accept receiving metadata packets that contain exactly 0
byte of metadata payload. This kind of flush can happen on trace
teardown.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: lttng-live: 100ms active poll delay
Mathieu Desnoyers [Mon, 24 Feb 2014 17:54:03 +0000 (12:54 -0500)] 
Fix: lttng-live: 100ms active poll delay

Do a 100ms delay before retry intead of 1s delays (slightly too long in
terms of user experience) and instead of actively hogging the CPU (too
fast).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: lttng-live await metadata
Mathieu Desnoyers [Mon, 24 Feb 2014 17:24:54 +0000 (12:24 -0500)] 
Fix: lttng-live await metadata

Expect at least _some_ metadata in get_new_metadata. Retry until we
receive some metadata.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: lttng-live recv() and send() flags, partial recv()
Mathieu Desnoyers [Mon, 24 Feb 2014 16:49:03 +0000 (11:49 -0500)] 
Fix: lttng-live recv() and send() flags, partial recv()

Introduce lttng_live_recv() and lttng_live_send():

- Enforce MSG_NOSIGNAL flag for send(),
- Continue recv() after partial message is received.
- Handle EINTR within those wrappers.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: missing little endian conversion for one index field
Julien Desfossez [Mon, 24 Feb 2014 18:34:01 +0000 (13:34 -0500)] 
Fix: missing little endian conversion for one index field

Locked-step with lttng-tools commit :
Fix: missing big endian conversion for one index field

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup: remove logically dead code
Mathieu Desnoyers [Fri, 21 Feb 2014 15:17:22 +0000 (10:17 -0500)] 
Cleanup: remove logically dead code

CID 1021557 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line:
Execution cannot reach this statement "goto end;".

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: untrusted value as argument
Mathieu Desnoyers [Fri, 21 Feb 2014 13:58:02 +0000 (08:58 -0500)] 
Fix: untrusted value as argument

Fix coverity:

CID 1132646 (#1 of 1): Untrusted value as argument (TAINTED_SCALAR)8.
tainted_data: Passing tainted variable "index_hdr.packet_index_len" to a
tainted sink.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: off by one in lttng-live path length check
Mathieu Desnoyers [Fri, 21 Feb 2014 02:49:31 +0000 (21:49 -0500)] 
Fix: off by one in lttng-live path length check

Does not account for final \0.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: fclose return value unchecked
Mathieu Desnoyers [Thu, 20 Feb 2014 22:01:55 +0000 (17:01 -0500)] 
Fix: fclose return value unchecked

** CID 1181988:  Unchecked return value  (CHECKED_RETURN)
/formats/lttng-live/lttng-live-comm.c: 900 in get_new_metadata()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: call to append metadata when new metadata is added
Julien Desfossez [Thu, 20 Feb 2014 05:50:27 +0000 (00:50 -0500)] 
Fix: call to append metadata when new metadata is added

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: use memstream instead of tmp file for live metadata
Julien Desfossez [Thu, 20 Feb 2014 05:50:26 +0000 (00:50 -0500)] 
Fix: use memstream instead of tmp file for live metadata

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: assign a trace handle to every live trace
Julien Desfossez [Thu, 20 Feb 2014 05:50:25 +0000 (00:50 -0500)] 
Fix: assign a trace handle to every live trace

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: get_new_metadata receive all the metadata
Julien Desfossez [Thu, 20 Feb 2014 05:50:24 +0000 (00:50 -0500)] 
Fix: get_new_metadata receive all the metadata

Instead of doing the loop in the caller, let get_new_metadata fetch all
the metadata required. Also, call this function when get_packet detects
that we need to refresh the metadata.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Coverity warning CWE-457: Use of Uninitialized Variable
Jérémie Galarneau [Thu, 20 Feb 2014 06:12:01 +0000 (01:12 -0500)] 
Fix: Coverity warning CWE-457: Use of Uninitialized Variable

ret is uninitialized if no streams are declared in the trace
descriptor.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoRevert "Fix: get_new_metadata receive all the metadata"
Mathieu Desnoyers [Thu, 20 Feb 2014 03:20:43 +0000 (22:20 -0500)] 
Revert "Fix: get_new_metadata receive all the metadata"

This reverts commit bb17fa55a7694db83af6f00b16b3e545712662f7.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoRevert "Fix: assign a trace handle to every live trace"
Mathieu Desnoyers [Thu, 20 Feb 2014 03:20:18 +0000 (22:20 -0500)] 
Revert "Fix: assign a trace handle to every live trace"

This reverts commit 42423b0a691fb4b2efbb5a45eb7eefa5f350ec30.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: assign a trace handle to every live trace
Julien Desfossez [Wed, 19 Feb 2014 23:23:53 +0000 (18:23 -0500)] 
Fix: assign a trace handle to every live trace

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: get_new_metadata receive all the metadata
Julien Desfossez [Wed, 19 Feb 2014 23:23:52 +0000 (18:23 -0500)] 
Fix: get_new_metadata receive all the metadata

Instead of doing the loop in the caller, let get_new_metadata fetch all
the metadata required. Also, call this function when get_packet detects
that we need to refresh the metadata.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCTF: Support incremental metadata append
Mathieu Desnoyers [Wed, 19 Feb 2014 00:19:26 +0000 (19:19 -0500)] 
CTF: Support incremental metadata append

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: ctf.c fscanf missing integer length check
Mathieu Desnoyers [Wed, 19 Feb 2014 01:40:40 +0000 (20:40 -0500)] 
Fix: ctf.c fscanf missing integer length check

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoBump soname version to 1.0.0
Mathieu Desnoyers [Wed, 19 Feb 2014 01:25:02 +0000 (20:25 -0500)] 
Bump soname version to 1.0.0

Since there were ABI changes since 0.0.0.

Also add missing -Wl,--no-as-needed to lttng-live plugin.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoMove scanner allocation/free outside of ctf_open_trace_metadata_read
Mathieu Desnoyers [Tue, 18 Feb 2014 23:01:55 +0000 (18:01 -0500)] 
Move scanner allocation/free outside of ctf_open_trace_metadata_read

In preparation for incremental metadata parsing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCTF parser: prepare for incremental metadata parsing
Mathieu Desnoyers [Tue, 18 Feb 2014 22:44:37 +0000 (17:44 -0500)] 
CTF parser: prepare for incremental metadata parsing

Associate the file pointer to ctf_scanner_append_ast() rather than to
ctf_scanner_alloc().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.041163 seconds and 4 git commands to generate.