babeltrace.git
7 years agoStore "tracer_name" from the trace's environment
Philippe Proulx [Sat, 12 Sep 2015 03:24:54 +0000 (23:24 -0400)] 
Store "tracer_name" from the trace's environment

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: Missing pointer dereference in NULL check
Jérémie Galarneau [Wed, 6 Apr 2016 18:32:40 +0000 (14:32 -0400)] 
Fix: Missing pointer dereference in NULL check

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: leak of stream intersection positions
Jérémie Galarneau [Tue, 5 Apr 2016 21:44:42 +0000 (17:44 -0400)] 
Fix: leak of stream intersection positions

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoRemove useless bt_iter when creating intersection
Jérémie Galarneau [Tue, 5 Apr 2016 21:24:15 +0000 (17:24 -0400)] 
Remove useless bt_iter when creating intersection

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoAdd new test artifacts to .gitignore
Jérémie Galarneau [Tue, 5 Apr 2016 18:41:34 +0000 (14:41 -0400)] 
Add new test artifacts to .gitignore

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: use templates for stream intersection and packet_seq_num
Jérémie Galarneau [Tue, 5 Apr 2016 17:08:59 +0000 (13:08 -0400)] 
Tests: use templates for stream intersection and packet_seq_num

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests: fix OOT build by adding test scripts to noinst_SCRIPTS
Jérémie Galarneau [Tue, 5 Apr 2016 15:15:07 +0000 (11:15 -0400)] 
Tests: fix OOT build by adding test scripts to noinst_SCRIPTS

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoDocs: Add --stream-intersection to the BABELTRACE(1) man page
Jérémie Galarneau [Mon, 4 Apr 2016 22:42:14 +0000 (18:42 -0400)] 
Docs: Add --stream-intersection to the BABELTRACE(1) man page

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTest the stream intersection feature
Julien Desfossez [Mon, 21 Sep 2015 15:23:05 +0000 (11:23 -0400)] 
Test the stream intersection feature

5 traces are provided:
- 3 packets intersecting between two streams slightly offsetted
- Same trace with 3 packets intersecting but with swapped trace file names
- No intersection between packets
- Only one stream
- No streams at all

These traces were generated with the CTF writer API from the master
branch, the binary traces will be replaced by the test program when the
feature arrives in master.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoOption to only show streams' intersection
Julien Desfossez [Mon, 14 Sep 2015 17:05:59 +0000 (13:05 -0400)] 
Option to only show streams' intersection

The --stream-intersection option allows showing only the events that
fit in the intersection of all streams, thus filtering out the events
for which only some streams have the time range info. This is achieved
by using the packet header timestamp begin/end information available
within each stream.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoTests for packet_seq_num handling
Julien Desfossez [Mon, 21 Sep 2015 20:28:34 +0000 (16:28 -0400)] 
Tests for packet_seq_num handling

5 traces are provided:
- no packets lost
- no packets lost with packet_seq_num not starting at 0
- 2 events lost before the last packet
- 2 streams with events lost in 1
- 2 stream with events lost in both

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoOutput a warning if packets are lost
Julien Desfossez [Thu, 20 Aug 2015 01:19:58 +0000 (21:19 -0400)] 
Output a warning if packets are lost

Depends on the packet_seq_num fields available in the CTF index v1.1
(produced by LTTng 2.8).
Same limitation as the events discarded information: if a stream is
split in multiple files, the counters might not report the appropriate
information for now.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoClean-up: Use memset() to initialize packet_index
Jérémie Galarneau [Mon, 26 Oct 2015 16:11:30 +0000 (12:11 -0400)] 
Clean-up: Use memset() to initialize packet_index

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoSupport ctf index version 1.1
Julien Desfossez [Thu, 20 Aug 2015 01:19:57 +0000 (21:19 -0400)] 
Support ctf index version 1.1

Produced by LTTng as of 2.8 (no compatibility breakage with 1.0)

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: return event timestamp in _timestamp_at_pos
Antoine Busque [Fri, 22 Apr 2016 20:58:00 +0000 (16:58 -0400)] 
Fix: return event timestamp in _timestamp_at_pos

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: lttng-live flush when output to file
Mathieu Desnoyers [Tue, 19 Apr 2016 22:42:06 +0000 (18:42 -0400)] 
Fix: lttng-live flush when output to file

When the standard output is redirected to a file, we need to flush the
output between each packet, otherwise the stream buffering may keep us
from seeing events for a while in a low-throughput trace.

While we are there, document that lttng-live does now support the
--output option in babeltrace 1.x.

Fixes #1010

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 years agoFix: lttng-live use g_free rather than free
Mathieu Desnoyers [Tue, 19 Apr 2016 02:26:40 +0000 (22:26 -0400)] 
Fix: lttng-live use g_free rather than free

g_new0 should be paired with g_free.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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>
This page took 0.04209 seconds and 4 git commands to generate.