babeltrace.git
6 years agoClean-up: fix comment style in bin-info.c
Jérémie Galarneau [Mon, 2 May 2016 19:26:08 +0000 (15:26 -0400)] 
Clean-up: fix comment style in bin-info.c

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd tap-driver.sh from automake
Jérémie Galarneau [Fri, 29 Apr 2016 22:55:12 +0000 (18:55 -0400)] 
Add tap-driver.sh from automake

Solaris 11's automake does not include tap-driver.sh.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: skip certain bin-info tests on failure to prevent segfault
Antoine Busque [Fri, 29 Apr 2016 22:12:42 +0000 (18:12 -0400)] 
Tests: skip certain bin-info tests on failure to prevent segfault

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTypo: succesful* -> successful*
Jérémie Galarneau [Wed, 27 Apr 2016 21:11:08 +0000 (17:11 -0400)] 
Typo: succesful* -> successful*

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: strip ELF symbols from debuginfo-data executables with separate DWARF
Antoine Busque [Fri, 29 Apr 2016 22:13:39 +0000 (18:13 -0400)] 
Tests: strip ELF symbols from debuginfo-data executables with separate DWARF

Stripping the symbols prevents the framework from falling back to ELF
lookup should the separate DWARF files be missing, which would cause
tests to succeed when they should fail.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPython bindings: add has_intersection property to TraceCollection
Antoine Busque [Mon, 2 May 2016 19:50:02 +0000 (15:50 -0400)] 
Python bindings: add has_intersection property to TraceCollection

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPython bindings: make intersect_mode read-only property
Antoine Busque [Mon, 2 May 2016 19:46:48 +0000 (15:46 -0400)] 
Python bindings: make intersect_mode read-only property

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: Add missing debuginfo files to dist
Michael Jeanson [Fri, 29 Apr 2016 21:05:31 +0000 (17:05 -0400)] 
Tests: Add missing debuginfo files to dist

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUse tar-ustar format for dist
Michael Jeanson [Fri, 29 Apr 2016 20:58:14 +0000 (16:58 -0400)] 
Use tar-ustar format for dist

This is required to support file names longuer than 99 characters
when generating the dist tarball, which we require because of the
sphinx theme files in the python bindings documentation.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: Replace prove by autotools tap runner
Michael Jeanson [Fri, 29 Apr 2016 18:35:06 +0000 (14:35 -0400)] 
Tests: Replace prove by autotools tap runner

This patch removes the dependency on the prove perl script
to run the TAP test suite. It replaces it with the autotools
shell TAP driver that only requires a shell and awk.

Custom arguments can be passed to the test runner with
env variables as follow:

  env LOG_DRIVER_FLAGS='--comments --ignore-exit' \
      TESTS='foo.test baz.test' make -e check

This tap driver also creates a log file for each test that
can then be used by another system to build a test report.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup test scripts
Michael Jeanson [Thu, 28 Apr 2016 20:15:14 +0000 (16:15 -0400)] 
Cleanup test scripts

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Don't clean test scripts
Michael Jeanson [Thu, 28 Apr 2016 16:57:03 +0000 (12:57 -0400)] 
Fix: Don't clean test scripts

Test scripts are generated by configure, not make. Therefore, we do
not want a make clean to remove them. Let automake handle dist and
clean.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Make test_dwarf and test_bin_info tests work out-of-tree
Simon Marchi [Thu, 28 Apr 2016 16:43:37 +0000 (12:43 -0400)] 
Fix: Make test_dwarf and test_bin_info tests work out-of-tree

When building out of tree, these tests fail to find the test data.
This patch makes them (their _complete wrappers, actually) generated
by Autoconf, so the proper path to the test data (which is in the
source directory) can be written.

We can also get rid of SCRIPT_LIST and it's custom rules.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoHandle test_ctf_writer_complete like the other tests scripts
Michael Jeanson [Thu, 28 Apr 2016 16:38:20 +0000 (12:38 -0400)] 
Handle test_ctf_writer_complete like the other tests scripts

Even if test_ctf_writer_complete doesn't require any substitutions,
handle it like the other test scripts which will be less error prone
and will allow to remove all the SCRIPT_LIST custom rules.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: let automake handle CLEAN and DIST
Simon Marchi [Thu, 28 Apr 2016 02:52:19 +0000 (22:52 -0400)] 
Fix: let automake handle CLEAN and DIST

Files test_seek_empty_packet and test_seek_big_trace are generated by
configuring, not by making.  Therefore, we do not want a make clean to
remove them.  Otherwise, doing...

  * make
  * make clean
  * make
  * make check

... fails.

Automake infers EXTRA_DIST and DISTCLEANFILES from AC_CONFIG_FILES.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST
Simon Marchi [Thu, 28 Apr 2016 02:52:18 +0000 (22:52 -0400)] 
Fix: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST

Since these files are generated by autoconf, they shouldn't be included
in SCRIPT_LIST, which is the list of scripts to copy from the source
directory to the build directory.  This gets rid of these warnings when
building out of tree:

  cp: cannot stat '/home/simark/src/babeltrace/tests/lib/test_seek_big_trace': No such file or directory
  cp: cannot stat '/home/simark/src/babeltrace/tests/lib/test_seek_empty_packet': No such file or directory

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoconfigure: introduce new macro AX_LIB_ELFUTILS
Jérémie Galarneau [Thu, 28 Apr 2016 22:07:48 +0000 (18:07 -0400)] 
configure: introduce new macro AX_LIB_ELFUTILS

elfutils has only just started providing pkg-config metadata
which makes the current version check unreliable. This introduces
a new M4 macro which checks elfutils' version using the
_ELFUTILS_PREREQ macro (defined in elfutils/version.h).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoDocs: fix typos in babeltrace-log(1) manpage
Antoine Busque [Wed, 27 Apr 2016 21:14:14 +0000 (17:14 -0400)] 
Docs: fix typos in babeltrace-log(1) manpage

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoDocs: update debuginfo doc
Antoine Busque [Wed, 27 Apr 2016 20:58:30 +0000 (16:58 -0400)] 
Docs: update debuginfo doc

Update the output format in the examples and document the new
--debug-info-target-prefix and --debug-info-full-path command line
options.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd configure report
Michael Jeanson [Sat, 23 Apr 2016 19:43:15 +0000 (15:43 -0400)] 
Add configure report

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoconfigure: check for elfutils (libelf and libdw) >= 0.154
Jérémie Galarneau [Thu, 28 Apr 2016 18:57:08 +0000 (14:57 -0400)] 
configure: check for elfutils (libelf and libdw) >= 0.154

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoSet the minimal version of elfutils to 0.154
Jérémie Galarneau [Thu, 28 Apr 2016 16:09:58 +0000 (12:09 -0400)] 
Set the minimal version of elfutils to 0.154

elfutils 0.154 is required since it is the first release to
include commit 5479725 (dwarf_highpc: Handle DW_AT_high_pc being
a constant offset from DW_AT_low_pc).

This is fix is required to read DwARF information produced by
"modern" (post-2012) GCCs which make use of this DWARF4
capability when generating position independant code. The binaries
provided as part of the test suite make use of this feature. Hence,
tests will fail with older elfutils versions.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoDoc: Add elfutils to README
Michael Jeanson [Sat, 23 Apr 2016 18:55:58 +0000 (14:55 -0400)] 
Doc: Add elfutils to README

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: return -1 on bin_info_lookup_dwarf_function_name failure
Jérémie Galarneau [Wed, 27 Apr 2016 19:21:00 +0000 (15:21 -0400)] 
Fix: return -1 on bin_info_lookup_dwarf_function_name failure

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoHarmonize spelling of debug-info
Jérémie Galarneau [Wed, 27 Apr 2016 19:01:15 +0000 (15:01 -0400)] 
Harmonize spelling of debug-info

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoIndicate default debug-info build settings in configure help
Jérémie Galarneau [Wed, 27 Apr 2016 16:01:59 +0000 (12:01 -0400)] 
Indicate default debug-info build settings in configure help

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoDisable debuginfo by default on Solaris and OSX
Michael Jeanson [Sat, 23 Apr 2016 13:59:14 +0000 (09:59 -0400)] 
Disable debuginfo by default on Solaris and OSX

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoDocs: Add --debug-info-target-prefix to man page
Jérémie Galarneau [Fri, 22 Apr 2016 21:31:17 +0000 (17:31 -0400)] 
Docs: Add --debug-info-target-prefix to man page

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd source and information to regenerate debuginfo-data
Antoine Busque [Fri, 22 Apr 2016 15:34:21 +0000 (11:34 -0400)] 
Add source and information to regenerate debuginfo-data

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUse bool where possible in dwarf and bin-info
Antoine Busque [Thu, 21 Apr 2016 06:26:04 +0000 (02:26 -0400)] 
Use bool where possible in dwarf and bin-info

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoRename so-info to bin-info
Antoine Busque [Thu, 21 Apr 2016 05:55:10 +0000 (01:55 -0400)] 
Rename so-info to bin-info

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUse printf_debug/verbose in so-info
Antoine Busque [Thu, 21 Apr 2016 05:02:27 +0000 (01:02 -0400)] 
Use printf_debug/verbose in so-info

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: update tests for new dwarf func name output
Antoine Busque [Wed, 20 Apr 2016 21:38:43 +0000 (17:38 -0400)] 
Fix: update tests for new dwarf func name output

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUpdate debuginfo to match UST event rename
Antoine Busque [Wed, 20 Apr 2016 21:35:40 +0000 (17:35 -0400)] 
Update debuginfo to match UST event rename

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUse g_build_path for DWARF build_id lookup
Antoine Busque [Wed, 20 Apr 2016 21:25:59 +0000 (17:25 -0400)] 
Use g_build_path for DWARF build_id lookup

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd --debug-info-target-prefix
Antoine Busque [Tue, 19 Apr 2016 23:57:57 +0000 (19:57 -0400)] 
Add --debug-info-target-prefix

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoRefactor offset string printing out of ELF and DWARF lookups
Antoine Busque [Tue, 19 Apr 2016 19:24:45 +0000 (15:24 -0400)] 
Refactor offset string printing out of ELF and DWARF lookups

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPrint offset relative to function when using DWARF
Antoine Busque [Tue, 19 Apr 2016 17:43:10 +0000 (13:43 -0400)] 
Print offset relative to function when using DWARF

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPrint bin location first
Antoine Busque [Mon, 18 Apr 2016 22:34:11 +0000 (18:34 -0400)] 
Print bin location first

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd binary location information
Antoine Busque [Mon, 18 Apr 2016 22:31:53 +0000 (18:31 -0400)] 
Add binary location information

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: prevent uninitialized use of elf_file
Antoine Busque [Mon, 18 Apr 2016 22:30:43 +0000 (18:30 -0400)] 
Fix: prevent uninitialized use of elf_file

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoOnly set so info ELF file when needed
Antoine Busque [Fri, 15 Apr 2016 21:39:24 +0000 (17:39 -0400)] 
Only set so info ELF file when needed

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUse is_pic field instead of reading ELF header
Antoine Busque [Fri, 15 Apr 2016 20:54:18 +0000 (16:54 -0400)] 
Use is_pic field instead of reading ELF header

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: make short_src_path from src_path
Antoine Busque [Mon, 18 Apr 2016 20:24:29 +0000 (16:24 -0400)] 
Fix: make short_src_path from src_path

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: clean generated tests scripts
Jérémie Galarneau [Wed, 20 Apr 2016 21:15:20 +0000 (17:15 -0400)] 
Tests: clean generated tests scripts

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: Add missing test scripts to gitignore
Michael Jeanson [Thu, 14 Apr 2016 11:56:27 +0000 (07:56 -0400)] 
Tests: Add missing test scripts to gitignore

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: Use AC_CONFIG_FILES to generate test scripts
Michael Jeanson [Thu, 14 Apr 2016 11:55:06 +0000 (07:55 -0400)] 
Tests: Use AC_CONFIG_FILES to generate test scripts

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix out-of-tree tests: seek tests can't find traces
Jérémie Galarneau [Wed, 10 Feb 2016 16:25:33 +0000 (11:25 -0500)] 
Fix out-of-tree tests: seek tests can't find traces

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoDocs: Add debug-info option to BABELTRACE(1)
Jérémie Galarneau [Mon, 18 Apr 2016 20:54:15 +0000 (16:54 -0400)] 
Docs: Add debug-info option to BABELTRACE(1)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPrint "binary+offset" when function name can't be resolved
Jérémie Galarneau [Mon, 18 Apr 2016 13:33:14 +0000 (09:33 -0400)] 
Print "binary+offset" when function name can't be resolved

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Don't skip binary path print-out in ELF-only case
Jérémie Galarneau [Fri, 15 Apr 2016 21:30:32 +0000 (17:30 -0400)] 
Fix: Don't skip binary path print-out in ELF-only case

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoShow binary path as part of debug info
Jérémie Galarneau [Fri, 15 Apr 2016 19:39:33 +0000 (15:39 -0400)] 
Show binary path as part of debug info

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd --debug-info-full-path option and shorten source name
Jérémie Galarneau [Fri, 15 Apr 2016 17:37:38 +0000 (13:37 -0400)] 
Add --debug-info-full-path option and shorten source name

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoRename opt_debug_dir to opt_debug_info_dir
Jérémie Galarneau [Fri, 15 Apr 2016 17:18:37 +0000 (13:18 -0400)] 
Rename opt_debug_dir to opt_debug_info_dir

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: cast of 64 bit addresses from trace to 32-bit pointer
Jérémie Galarneau [Thu, 14 Apr 2016 21:58:13 +0000 (17:58 -0400)] 
Fix: cast of 64 bit addresses from trace to 32-bit pointer

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: dynamically create test list based on enabled features
Jérémie Galarneau [Thu, 14 Apr 2016 16:19:09 +0000 (12:19 -0400)] 
Tests: dynamically create test list based on enabled features

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd intersect mode to python bindings
Antoine Busque [Mon, 2 May 2016 18:59:07 +0000 (14:59 -0400)] 
Add intersect mode to python bindings

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoAdd bt_ctf_iter_create_intersect to CTF iterator API
Antoine Busque [Wed, 6 Apr 2016 19:19:02 +0000 (15:19 -0400)] 
Add bt_ctf_iter_create_intersect to CTF iterator API

This new method allows direct creation of a `bt_ctf_iter`
corresponding to the intersection of streams in a given trace
collection. Adding it to the CTF iterator API allows reuse by both the
converter and (eventually) bindings.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoDocs: add high-level debug info doc
Antoine Busque [Fri, 20 Nov 2015 21:29:13 +0000 (16:29 -0500)] 
Docs: add high-level debug info doc

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: add unit tests for so_info
Antoine Busque [Wed, 30 Sep 2015 08:54:46 +0000 (04:54 -0400)] 
Tests: add unit tests for so_info

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: add unit tests for bt_dwarf
Antoine Busque [Mon, 28 Sep 2015 10:01:52 +0000 (06:01 -0400)] 
Tests: add unit tests for bt_dwarf

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoInitial implementation of the debuginfo API
Antoine Busque [Wed, 9 Sep 2015 09:05:27 +0000 (05:05 -0400)] 
Initial implementation of the debuginfo API

This patchset adds so_info and durin, which are used in debug info or
callsite analysis. The developer is expected to use the SO info API
documented in `include/babeltrace/so-info.h`. Durin is only used
internally by so_info as a wrapper around `libdw`.

The analysis itself is implemented in the new `lib/debuginfo.c`.

This introduces a dependency on `libelf` and `libdw` from
elfutils. The feature can be disabled at configure time with the
`--disable-debuginfo` flag.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
This page took 0.064979 seconds and 4 git commands to generate.