babeltrace.git
8 years agoFix: lttng-live data_size and version endianness
Julien Desfossez [Tue, 8 Mar 2016 05:32:27 +0000 (00:32 -0500)] 
Fix: lttng-live data_size and version endianness

The data_size and cmd_version fields need to be sent in network byte
order to the relay. These fields are currently ignored by the relay
because the commands have a fix-sized payload so it does not cause any
problem for now, but they may be used in the future, so we should avoid
any confusion.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoUpdate version to v1.3.2 v1.3.2
Jérémie Galarneau [Mon, 29 Feb 2016 21:49:24 +0000 (16:49 -0500)] 
Update version to v1.3.2

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPython bindings: work around Python 3.5 behaviour change
Jérémie Galarneau [Mon, 29 Feb 2016 20:08:15 +0000 (15:08 -0500)] 
Python bindings: work around Python 3.5 behaviour change

Python 3.5 changes the StopIteration exception clearing behaviour when
a generator finishes its iteration. This causes the interpreter to
errounously consider SWIG clean-up functions as having "set an error".

This hack explicitly allocates and cleans up struct bt_iter_pos
instead of relying on SWIG auto-generated code which manages
the lifetime of temporary objects.

An investigation of the cause of this change is under way, but at
least this makes the bindings usable on Python 3.5 which is
being rolled-out in some distros.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: out-of-bound memory access
Mathieu Desnoyers [Tue, 9 Feb 2016 18:27:22 +0000 (13:27 -0500)] 
Fix: out-of-bound memory access

We need to check for end of stream before updating the current packet
index, else we access memory beyond the last stream packet index array
element. This fixes valgrind errors which appear at commit

480ef05 Support ctf index version 1.1

due to change of the element size, but actually caused by commit

2654fe9 Fix: events discarded timing inaccuracy

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: out-of-tree dist fails to find test traces
Jérémie Galarneau [Fri, 20 Feb 2015 20:29:56 +0000 (15:29 -0500)] 
Fix: out-of-tree dist fails to find test traces

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix running tests out of tree
Simon Marchi [Sat, 14 Feb 2015 18:49:38 +0000 (13:49 -0500)] 
Fix running tests out of tree

When building out of tree, make check fails because the "tests" file is
not found.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoUpdate version to v1.3.1 v1.3.1
Jérémie Galarneau [Tue, 10 Nov 2015 18:38:44 +0000 (13:38 -0500)] 
Update version to v1.3.1

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Confusion between stream and stream class IDs
Jérémie Galarneau [Tue, 10 Nov 2015 18:19:06 +0000 (13:19 -0500)] 
Fix: Confusion between stream and stream class IDs

CTF Writer is using the stream id, which is really a "file id",
to populate the packet header. The packet header's id should
match a stream class declaration in the TSDL metadata file.

Reported-by: Rocky Dunlap <rsdunlapiv@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoOnly compare "bison -y" to the basename of YACC variable
Jonathan Rajotte [Thu, 22 Oct 2015 21:07:02 +0000 (17:07 -0400)] 
Only compare "bison -y" to the basename of YACC variable

In the event that the YACC variable is set to a full path
this test fail even if it should not.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoCleanup: Don't hardcode include paths unnecessarily
Jérémie Galarneau [Sat, 17 Oct 2015 19:19:05 +0000 (15:19 -0400)] 
Cleanup: Don't hardcode include paths unnecessarily

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: include ctf-scanner-symbols.h to prefix yy_* symbols
Jérémie Galarneau [Sat, 17 Oct 2015 19:18:40 +0000 (15:18 -0400)] 
Fix: include ctf-scanner-symbols.h to prefix yy_* symbols

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoUpdate version to v1.3.0 v1.3.0
Jérémie Galarneau [Fri, 16 Oct 2015 21:00:38 +0000 (17:00 -0400)] 
Update version to v1.3.0

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: missing includes break the out-of-tree build
Jérémie Galarneau [Fri, 16 Oct 2015 19:31:28 +0000 (15:31 -0400)] 
Fix: missing includes break the out-of-tree build

Addresses out-of-tree build breakage introduced by
commit 3842465694945829d76452ff83924aa0103c6293

Reported-by: Nathan Lynch <Nathan_Lynch@mentor.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Silence missing sentinel warnings on GCC 4
Michael Jeanson [Fri, 16 Oct 2015 19:49:10 +0000 (15:49 -0400)] 
Fix: Silence missing sentinel warnings on GCC 4

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
8 years agoCleanup: remove unused label 'end'
Michael Jeanson [Thu, 15 Oct 2015 20:39:52 +0000 (16:39 -0400)] 
Cleanup: remove unused label 'end'

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
8 years agoFix: check for socket lib before function checks
Michael Jeanson [Thu, 15 Oct 2015 20:27:59 +0000 (16:27 -0400)] 
Fix: check for socket lib before function checks

On platforms that require extra libraries to link socket apps,
running this macro before the function checks will lead to
socket functions being correctly detected.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
8 years agoFix: memstream compat layer requires use of babeltrace_close_memstream
Mathieu Desnoyers [Thu, 15 Oct 2015 16:08:48 +0000 (12:08 -0400)] 
Fix: memstream compat layer requires use of babeltrace_close_memstream

In compatibility mode, the babeltrace compat layer around memstream
copies the file content into the buffer only at close.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agocompat send no SIGPIPE: multithread-safe
Mathieu Desnoyers [Thu, 15 Oct 2015 16:07:46 +0000 (12:07 -0400)] 
compat send no SIGPIPE: multithread-safe

The current implementation of the no-SIGPIPE send in the compatibility
layer has side-effects on multithreaded processes due to use of
sigaction(). Although multithread-safety is not strictly needed since
Babeltrace is single-threaded for now, there is no reason to keep this
limitation deeply rooted in a compatibility layer.

Use the multithreaded-safe algorithm to catch SIGPIPE implemented in
LTTng-UST for the write() system call for platforms that do not have
MSG_NOSIGNAL. It was originally implented in LTTng-UST as part of the
ring buffer wakeup. This is a re-implementation of this same algorithm
under MIT license. It uses signal masks and sigtimedwait.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: truncated value in fgetc() usage
Jérémie Galarneau [Thu, 15 Oct 2015 17:43:06 +0000 (13:43 -0400)] 
Fix: truncated value in fgetc() usage

Reported by Coverity Scan:
CID 1327417:  API usage errors  (CHAR_IO)
Assigning the return value of "fgetc" to char "c" truncates
its value.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: handle EINTR return value for bt_posix_fallocate
Mathieu Desnoyers [Tue, 13 Oct 2015 20:04:23 +0000 (16:04 -0400)] 
Fix: handle EINTR return value for bt_posix_fallocate

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoConfigure: Add missing checks
Michael Jeanson [Tue, 13 Oct 2015 19:29:58 +0000 (15:29 -0400)] 
Configure: Add missing checks

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoImplement bt_getline
Mathieu Desnoyers [Tue, 13 Oct 2015 18:56:44 +0000 (14:56 -0400)] 
Implement bt_getline

Implement our own getline to remove dependency from glibc 2.10+ and to
increase portability to other operating systems.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: initialize getline linesize argument to 0
Mathieu Desnoyers [Tue, 13 Oct 2015 18:44:05 +0000 (14:44 -0400)] 
Fix: initialize getline linesize argument to 0

It works by accident because getline() reallocates based on the initial
pointer, but doing this falls into a blind spot of the Linux man pages.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: warning, may be used uninitialized
Michael Jeanson [Fri, 9 Oct 2015 21:16:37 +0000 (17:16 -0400)] 
Fix: warning, may be used uninitialized

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: Replace dirent->d_type by stat S_ISREG
Michael Jeanson [Fri, 9 Oct 2015 20:19:40 +0000 (16:19 -0400)] 
Port: Replace dirent->d_type by stat S_ISREG

dirent->d_type is Linux specific while 'stat' is part of POSIX

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: Include config.h globally trough DEFAULT_INCLUDES
Michael Jeanson [Fri, 9 Oct 2015 19:50:25 +0000 (15:50 -0400)] 
Port: Include config.h globally trough DEFAULT_INCLUDES

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: Add compat for dirfd
Michael Jeanson [Fri, 9 Oct 2015 16:24:20 +0000 (12:24 -0400)] 
Port: Add compat for dirfd

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: Add compat for mkdtemp
Michael Jeanson [Fri, 9 Oct 2015 16:15:12 +0000 (12:15 -0400)] 
Port: Add compat for mkdtemp

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: Add compat for strnlen and strndup
Michael Jeanson [Fri, 9 Oct 2015 16:01:46 +0000 (12:01 -0400)] 
Port: Add compat for strnlen and strndup

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: Use bash to run tests
Michael Jeanson [Tue, 6 Oct 2015 20:30:12 +0000 (16:30 -0400)] 
Port: Use bash to run tests

The Solaris base shell does not support subshells with $()

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: Implement faccessat wrapper
Mathieu Desnoyers [Thu, 1 Oct 2015 20:26:20 +0000 (16:26 -0400)] 
Port: Implement faccessat wrapper

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPort: implement posix_fallocate wrapper
Jérémie Galarneau [Thu, 1 Oct 2015 19:53:47 +0000 (15:53 -0400)] 
Port: implement posix_fallocate wrapper

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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

9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
This page took 0.042157 seconds and 4 git commands to generate.