lttng-tools.git
8 years agoAdd offset comments to struct lttng_event
Philippe Proulx [Fri, 28 Aug 2015 15:20:47 +0000 (11:20 -0400)] 
Add offset comments to struct lttng_event

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd command header to sessiond->client response msg
Philippe Proulx [Wed, 26 Aug 2015 19:44:27 +0000 (15:44 -0400)] 
Add command header to sessiond->client response msg

Response messages from the session daemon have this layout
for the moment:

    [message header] (fixed size)
    [payload data]   (0 to n bytes)

This patch makes them have this layout:

    [message header] (fixed size)
    [command header] (0 to n bytes)
    [payload data]   (0 to n bytes)

The command header allows a command to specify additional
informations about its payload.

The header size is set to 0 for all commands for the moment.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd internal extended channel structure
Jérémie Galarneau [Thu, 25 Feb 2016 21:28:16 +0000 (16:28 -0500)] 
Add internal extended channel structure

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoMetadata for instance_id and packet_seq_num
Julien Desfossez [Mon, 29 Jun 2015 19:45:56 +0000 (15:45 -0400)] 
Metadata for instance_id and packet_seq_num

The UST tracer now stores a stream_instance_id in each packet to allow
the viewers to match streams split in multiple trace files.

Also, a sequence_number is stored in each packet so it is possible to
compute the number of lost packets in overwrite mode.

This is a locked-step with the corresponding lttng-ust commits.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd a HT to lookup sessions by id
Julien Desfossez [Fri, 7 Aug 2015 02:14:49 +0000 (22:14 -0400)] 
Add a HT to lookup sessions by id

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoExplicitly stop the session on lttng destroy
Julien Desfossez [Fri, 3 Jul 2015 21:08:27 +0000 (17:08 -0400)] 
Explicitly stop the session on lttng destroy

This changes the default behavior of the "destroy" command and API: now
it implicitely stops the tracing and waits for the data to be available
on disk or the network. Like the "stop" command and API, a no_wait
option is available to skip the waiting and destroy directly the
session.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: per-pid ust buffers flush race with application unregister
Mathieu Desnoyers [Wed, 24 Feb 2016 00:41:40 +0000 (19:41 -0500)] 
Fix: per-pid ust buffers flush race with application unregister

If an application exits between the moment we create the ust app session
(shadow copy) and the moment we send channels to the application,
sending channels may fail. If the application unregisters between the
the end of ust app session creation and the destroy that follows (ust
app session lock is released in between), we may see is_sent being
false.

This assert was initially there in the early days of lttng-tools when
the application was responsible for doing the flush. Now that the flush
has been moved to the consumer daemon, we don't need this assertion
anymore.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix warning when building Python bindings
Jérémie Galarneau [Tue, 23 Feb 2016 20:18:18 +0000 (15:18 -0500)] 
Fix warning when building Python bindings

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd CONTRIBUTING.md
Philippe Proulx [Sat, 20 Feb 2016 01:39:35 +0000 (20:39 -0500)] 
Add CONTRIBUTING.md

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoRevert "Python bindings: remove duplicate structure definitions"
Jérémie Galarneau [Tue, 23 Feb 2016 19:52:13 +0000 (14:52 -0500)] 
Revert "Python bindings: remove duplicate structure definitions"

This reverts commit dcac8046802214aa852b7b3b36bc78a793cb6295.

8 years agoDocs: clarify cross-version tracer compatibility
Jérémie Galarneau [Thu, 18 Feb 2016 17:23:44 +0000 (12:23 -0500)] 
Docs: clarify cross-version tracer compatibility

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoCleanup: Remove unnecessary newline
Jérémie Galarneau [Fri, 19 Feb 2016 19:34:22 +0000 (14:34 -0500)] 
Cleanup: Remove unnecessary newline

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Use ipv6 loopback adress in test_uri
Michael Jeanson [Thu, 18 Feb 2016 17:45:13 +0000 (12:45 -0500)] 
Fix: Use ipv6 loopback adress in test_uri

Some older version of Debian/Ubuntu and maybe other distros won't set
localhost to point on ::1 in the system hosts file and use instead a
custom name like ip6-localhost or ipv6-locahost which is not
standardized across distros.

To work around this, use the ipv6 loopback address instead of localhost.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoPython bindings: remove duplicate structure definitions
Jérémie Galarneau [Thu, 18 Feb 2016 16:56:50 +0000 (11:56 -0500)] 
Python bindings: remove duplicate structure definitions

Use the structure definitions as defined in the public lttng
headers and not local copies which will go unmaintained.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: test: handle env variables undefined
Jonathan Rajotte [Wed, 17 Feb 2016 21:33:00 +0000 (16:33 -0500)] 
Fix: test: handle env variables undefined

Prevent errors on non-existent key fetching e.g LD_PRELOAD & LD_LIBRARY_PATH.
Uses .get() with a default empty string to prevent this case.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: report already enabled event error to client
Jérémie Galarneau [Sun, 14 Feb 2016 23:22:03 +0000 (18:22 -0500)] 
Fix: report already enabled event error to client

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoDocs: add comment to cmd_add_context()
Jérémie Galarneau [Sun, 14 Feb 2016 23:02:21 +0000 (18:02 -0500)] 
Docs: add comment to cmd_add_context()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: application context leak when enabling context
Jérémie Galarneau [Sun, 14 Feb 2016 23:00:43 +0000 (18:00 -0500)] 
Fix: application context leak when enabling context

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: string leak when processing of client message fails
Jérémie Galarneau [Sun, 14 Feb 2016 22:57:19 +0000 (17:57 -0500)] 
Fix: string leak when processing of client message fails

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: missing return code initialization on error
Jérémie Galarneau [Sun, 14 Feb 2016 22:54:24 +0000 (17:54 -0500)] 
Fix: missing return code initialization on error

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: unchecked return value in _lttng_variant_statedump()
Jérémie Galarneau [Sun, 14 Feb 2016 22:52:03 +0000 (17:52 -0500)] 
Fix: unchecked return value in _lttng_variant_statedump()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Possible use-after-free in create_ctx_type()
Jérémie Galarneau [Sun, 14 Feb 2016 22:48:43 +0000 (17:48 -0500)] 
Fix: Possible use-after-free in create_ctx_type()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: filter tests now accept "." in identifiers
Mathieu Desnoyers [Sat, 13 Feb 2016 16:18:27 +0000 (11:18 -0500)] 
Fix: filter tests now accept "." in identifiers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Don't notify agent of non-app context addition
Jérémie Galarneau [Tue, 9 Feb 2016 20:16:49 +0000 (15:16 -0500)] 
Fix: Don't notify agent of non-app context addition

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoCreate agent on channel creation
Jérémie Galarneau [Tue, 9 Feb 2016 20:16:38 +0000 (15:16 -0500)] 
Create agent on channel creation

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoIntroduce application contexts to session configuration schema
Jérémie Galarneau [Tue, 9 Feb 2016 20:12:33 +0000 (15:12 -0500)] 
Introduce application contexts to session configuration schema

Session configuration schema version is bumped to 2.8.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix typos in error descriptions
Jérémie Galarneau [Tue, 9 Feb 2016 20:11:32 +0000 (15:11 -0500)] 
Fix typos in error descriptions

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoEnable agent application contexts if filter has such dependencies
Jérémie Galarneau [Fri, 5 Feb 2016 22:10:41 +0000 (17:10 -0500)] 
Enable agent application contexts if filter has such dependencies

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoCompare provider and context names in trace_ust_match_context
Jérémie Galarneau [Wed, 3 Feb 2016 23:51:29 +0000 (18:51 -0500)] 
Compare provider and context names in trace_ust_match_context

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAllow $app.provider:ctxname in filter, enum, variant identifiers
Mathieu Desnoyers [Tue, 26 Jan 2016 15:14:17 +0000 (10:14 -0500)] 
Allow $app.provider:ctxname in filter, enum, variant identifiers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd variant type support to ust registry and metadata
Mathieu Desnoyers [Mon, 18 Jan 2016 22:22:25 +0000 (17:22 -0500)] 
Add variant type support to ust registry and metadata

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoNotify java agent of enabled application contexts
Jérémie Galarneau [Thu, 28 Jan 2016 21:39:33 +0000 (16:39 -0500)] 
Notify java agent of enabled application contexts

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd app context support to lttng client
Jérémie Galarneau [Thu, 28 Jan 2016 00:01:50 +0000 (19:01 -0500)] 
Add app context support to lttng client

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoEnforce const-correctness in UNIX socket wrappers
Jérémie Galarneau [Tue, 26 Jan 2016 16:46:48 +0000 (11:46 -0500)] 
Enforce const-correctness in UNIX socket wrappers

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoRemove superflous domain check in context_ust_add
Jérémie Galarneau [Tue, 26 Jan 2016 16:46:17 +0000 (11:46 -0500)] 
Remove superflous domain check in context_ust_add

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoRemove superflous domain check in add_uctx_to_channel
Jérémie Galarneau [Tue, 26 Jan 2016 16:45:42 +0000 (11:45 -0500)] 
Remove superflous domain check in add_uctx_to_channel

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoUse lttng_domain_type enum instead of bare integer
Jérémie Galarneau [Tue, 26 Jan 2016 16:44:12 +0000 (11:44 -0500)] 
Use lttng_domain_type enum instead of bare integer

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd application context support to lttng-ctl lttng_add_context
Jérémie Galarneau [Tue, 26 Jan 2016 16:42:45 +0000 (11:42 -0500)] 
Add application context support to lttng-ctl lttng_add_context

Forward the provider and context names of app contexts to the
session daemon.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoCleanup comments in lttng-ctl.c
Jérémie Galarneau [Fri, 22 Jan 2016 21:23:43 +0000 (16:23 -0500)] 
Cleanup comments in lttng-ctl.c

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests fix: source utils.sh before using conf_proc_count
Jérémie Galarneau [Fri, 12 Feb 2016 21:41:49 +0000 (16:41 -0500)] 
Tests fix: source utils.sh before using conf_proc_count

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: use configured processor count in getcpu override tests
Jérémie Galarneau [Fri, 12 Feb 2016 16:19:22 +0000 (11:19 -0500)] 
Tests: use configured processor count in getcpu override tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: use configured processor count in snapshot tests
Jérémie Galarneau [Fri, 12 Feb 2016 16:17:42 +0000 (11:17 -0500)] 
Tests: use configured processor count in snapshot tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: Introduce conf_proc_count()
Jérémie Galarneau [Fri, 12 Feb 2016 16:17:18 +0000 (11:17 -0500)] 
Tests: Introduce conf_proc_count()

Tests are using the nproc utility which return the number of
_available_ CPUs. The distinction between online, available and
configured CPUs is subtle, but important.

The number of "online" CPUs can change at runtime as CPUs are
hot-plugged. This could happen during a test and result in
unexpected results.

The number of "configured" CPUs includes any CPU which may be
offline at the time.

The number of "available" CPUs, which is what is returned by the
nproc utility, may differ from both "online" and "configured"
counts. This is the case in containers which are assigned to a
subset of configured CPUs.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: print a more precise test description in snapshot tests
Jérémie Galarneau [Fri, 12 Feb 2016 15:40:50 +0000 (10:40 -0500)] 
Tests: print a more precise test description in snapshot tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoclock offset: print negative value in metadata for lttng-ust metadata
Mathieu Desnoyers [Mon, 8 Feb 2016 22:13:26 +0000 (17:13 -0500)] 
clock offset: print negative value in metadata for lttng-ust metadata

In the upcoming 2.8, we can print the negative value of clock offset in
the metadata, and expect users to update their viewers to correct any
bug that could prevent them from handling those negative values.

This happens only in cases where the system sets CLOCK_REALTIME to 0
after boot, thus leading to a negative clock offset value between
realtime and monotonic clocks.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: handle negative clock offset for lttng-ust metadata
Mathieu Desnoyers [Mon, 8 Feb 2016 22:13:25 +0000 (17:13 -0500)] 
Fix: handle negative clock offset for lttng-ust metadata

In the unlikely situation where a system sets its hardware clock
(CLOCK_REALTIME) to 0 (Epoch) after boot, the difference

  monotonic - realtime

becomes negative.

Fixup this situation by returning a 0 offset in this case.

This ensures that trace viewer implementations (e.g. babeltrace) which
currently cannot handle the negative offset (known bug) still work with
the generated traces.

This patch should be applied to master and stable-2.7.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: test: append to LD_LIBRARY_PATH
Jonathan Rajotte [Thu, 14 Jan 2016 20:08:22 +0000 (15:08 -0500)] 
Fix: test: append to LD_LIBRARY_PATH

The overwriting of LD_LIBRARY_PATH can cause failure of tests when lttng-ust is
not installed in the default path and location is passed via LD_LIBRARY_PATH.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: test: use load_path instead of $1
Jonathan Rajotte [Thu, 14 Jan 2016 18:40:42 +0000 (13:40 -0500)] 
Fix: test: use load_path instead of $1

$1 is used for tap condition checking not the load path.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoBump lttng-ust protocol version to 6.1
Jérémie Galarneau [Thu, 14 Jan 2016 16:08:53 +0000 (11:08 -0500)] 
Bump lttng-ust protocol version to 6.1

The introduction of enumerations in lttng-ust forces the protocol
to accomodate a new command which will only be used by lttng-ust
2.8+.

This is not a breaking change in the protocol since lttng-tools
does not _need_ to receive this command for normal operation, nor
does it issue it.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd CTF enum type support for UST registry
Mathieu Desnoyers [Sun, 10 Jan 2016 16:50:47 +0000 (11:50 -0500)] 
Add CTF enum type support for UST registry

Derived from initial implementation by:
Geneviève Bastien <gbastien+lttng@versatic.net>

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoCleanup __lttng_print macro indentation
Jérémie Galarneau [Wed, 13 Jan 2016 20:41:44 +0000 (15:41 -0500)] 
Cleanup __lttng_print macro indentation

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: do not print error and bug messages when quiet (-q) is present
Jonathan Rajotte [Mon, 11 Jan 2016 22:32:14 +0000 (17:32 -0500)] 
Fix: do not print error and bug messages when quiet (-q) is present

Conform to the lttng man page

fixes #988

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: test_ust-dl requires bash
Mathieu Desnoyers [Mon, 11 Jan 2016 00:13:24 +0000 (19:13 -0500)] 
Fix: test_ust-dl requires bash

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: test script requires bash
Mathieu Desnoyers [Mon, 11 Jan 2016 00:10:53 +0000 (19:10 -0500)] 
Fix: test script requires bash

The test baddr statedump script requires bash. It fails to run on
systems where /bin/sh is not an alias to bash.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: missing $ in SED variable
Michael Jeanson [Wed, 6 Jan 2016 17:31:42 +0000 (12:31 -0500)] 
Fix: missing $ in SED variable

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: fix make targets using objcopy
Michael Jeanson [Wed, 2 Dec 2015 16:56:41 +0000 (11:56 -0500)] 
Tests: fix make targets using objcopy

Add detection for objcopy using AC_CHECK_TOOL and use dedicated make
targets for each file.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoBuild: fallback to AC_CHECK_LIBS when looking for popt and uuid
Jonathan Rajotte [Tue, 1 Dec 2015 20:19:01 +0000 (15:19 -0500)] 
Build: fallback to AC_CHECK_LIBS when looking for popt and uuid

Not all distro ship .pc so fallback to basic libs searching if necessary.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agotests/unit: fix object files' location
Samuel Martin [Tue, 1 Dec 2015 23:36:45 +0000 (00:36 +0100)] 
tests/unit: fix object files' location

Referring to *.o files under a .libs/ directory is not recommended
because this belongs to libtool's innards.

Indeed, libtool decides to place the *.o files in an
implementation-specific location:
- PIC *.o files go into a .libs/ directory;
- non-PIC *.o files are generated along side to their corresponding
  source files.

Using PIC objects to build executable is legit, thought it may
introduce some minor overhead at runtime.

However, hard-coding these PIC object files in the Makefile.am to build
executables breaks the build in case of static only build.

In this case, no PIC object files is generated, so the linker will not
found some of the needed objects files.

Changing these dependencies' path fixes the static build, keeping the
shared one ok, though the non-PIC object files are now always built.

Fixes #983.

Fix tested on git master and v2.6 with no change needed.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoconfigure.ac: fix static build
Samuel Martin [Sun, 22 Nov 2015 22:38:00 +0000 (23:38 +0100)] 
configure.ac: fix static build

For static build, some extra LDFLAGS may be needed.

Using PKG_CHECK_MODULES instead of AC_CHECK_LIB for librairy detection
allows to get all these flags. Then, the LIBS variable can be extended
with everything that is needed.

So, use PKG_CHECK_MODULES for popt and uuid detection; which both depend
on libintl.

This changes fixes build failures triggered with Buildroot, e.g.:
  http://autobuild.buildroot.net/results/0f1/0f1e015a0c5a5ac2beeb5011d31a1e0058a32a0d/build-end.log

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: fix tracefile count when page_size is > 4k
Michael Jeanson [Fri, 27 Nov 2015 21:24:28 +0000 (16:24 -0500)] 
Tests: fix tracefile count when page_size is > 4k

Set the tracefile size according to the platform page_size and increase
the number of iterations to properly test the rotation.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoconfigure.ac: use $withval with AC_ARG_WITH
Samuel Martin [Sun, 22 Nov 2015 22:38:01 +0000 (23:38 +0100)] 
configure.ac: use $withval with AC_ARG_WITH

Fixes #980

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: close indexes when rotating the trace files in mmap mode
Jérémie Galarneau [Fri, 27 Nov 2015 20:47:01 +0000 (15:47 -0500)] 
Fix: close indexes when rotating the trace files in mmap mode

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: close indexes when rotating the trace files in splice mode
Julien Desfossez [Fri, 27 Nov 2015 17:12:44 +0000 (12:12 -0500)] 
Fix: close indexes when rotating the trace files in splice mode

The consumer needs to close the old index file when doing a file
rotation before opening a new one.
The relay does not have this problem (handled with refcounts).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoClarify error message on "add context" failure
Jérémie Galarneau [Thu, 19 Nov 2015 17:26:37 +0000 (12:26 -0500)] 
Clarify error message on "add context" failure

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Don't spam session daemon logs on invalid UST context
Jérémie Galarneau [Thu, 19 Nov 2015 17:07:56 +0000 (12:07 -0500)] 
Fix: Don't spam session daemon logs on invalid UST context

Fixes #976

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: getcpu_override: use event delay when launching with wrapper
Jérémie Galarneau [Thu, 12 Nov 2015 23:56:29 +0000 (18:56 -0500)] 
Tests: getcpu_override: use event delay when launching with wrapper

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: getcpu: no events shall be emitted at the same timestamp
Jérémie Galarneau [Thu, 12 Nov 2015 21:54:48 +0000 (16:54 -0500)] 
Tests: getcpu: no events shall be emitted at the same timestamp

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: Switch test apps to use usleep_safe()
Jérémie Galarneau [Thu, 12 Nov 2015 21:43:12 +0000 (16:43 -0500)] 
Tests: Switch test apps to use usleep_safe()

usleep_safe() ensures that usleep honors its timing guarantees
(which it, according to the man pages, does not strictly enforce).

Some tests need to make ensure no events are emitted at the same
timestamp since Babeltrace does not define an ordering which can
be relied upon in such a case.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: Add a test utils library
Jérémie Galarneau [Thu, 12 Nov 2015 21:42:05 +0000 (16:42 -0500)] 
Tests: Add a test utils library

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: redefinition of _GNU_SOURCE
Jérémie Galarneau [Thu, 12 Nov 2015 21:41:33 +0000 (16:41 -0500)] 
Fix: redefinition of _GNU_SOURCE

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: only call usleep if the test in configured to wait
Jérémie Galarneau [Thu, 12 Nov 2015 20:01:59 +0000 (15:01 -0500)] 
Tests: only call usleep if the test in configured to wait

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTest: add UST dl helper test
Antoine Busque [Tue, 4 Aug 2015 21:55:12 +0000 (17:55 -0400)] 
Test: add UST dl helper test

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTest: add UST baddr statedump test
Antoine Busque [Mon, 3 Aug 2015 20:16:37 +0000 (16:16 -0400)] 
Test: add UST baddr statedump test

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agolttng: add status command
Philippe Proulx [Sat, 5 Sep 2015 18:50:46 +0000 (14:50 -0400)] 
lttng: add status command

The status command is the equivalent of:
    lttng [general-options] list <current-session-name>

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agolttng: factor out declaration of commands
Philippe Proulx [Sat, 5 Sep 2015 18:15:21 +0000 (14:15 -0400)] 
lttng: factor out declaration of commands

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agomake check: add warning when LTTng processes are running
Philippe Proulx [Tue, 1 Sep 2015 02:32:11 +0000 (22:32 -0400)] 
make check: add warning when LTTng processes are running

This patch adds a warning when running LTTng/test processes are
detected at the beginning of make check. It offers a convenient
way to kill them and warns the user that some tests could fail
if the processes are kept alive.

The check can be disabled by setting
$LTTNG_TOOLS_TESTS_DISABLE_WARN_LTTNG_PROCESSES to 1

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoMissing cpu id kernel context in the kernel tracer ABI
Julien Desfossez [Wed, 11 Nov 2015 02:21:14 +0000 (21:21 -0500)] 
Missing cpu id kernel context in the kernel tracer ABI

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoUse --without-lttng-ust in error message
Michael Jeanson [Wed, 11 Nov 2015 19:54:17 +0000 (14:54 -0500)] 
Use --without-lttng-ust in error message

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoUse --with/--without for lttng-ust support
Jonathan Rajotte [Tue, 20 Oct 2015 18:57:24 +0000 (14:57 -0400)] 
Use --with/--without for lttng-ust support

Fixes #956

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.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 20:11:18 +0000 (16:11 -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>
9 years agoTests: Add debug output to getcpu_override
Jérémie Galarneau [Wed, 4 Nov 2015 23:45:04 +0000 (18:45 -0500)] 
Tests: Add debug output to getcpu_override

Adds debug output to the getcpu_override test and split its
two tests into two distinct functions. This ensures that we
output two separate traces without overwriting the previous one.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Change description of clock-override test
Jérémie Galarneau [Wed, 4 Nov 2015 23:24:48 +0000 (18:24 -0500)] 
Tests: Change description of clock-override test

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd event exclusion test for identical names
Philippe Proulx [Wed, 26 Aug 2015 06:26:42 +0000 (02:26 -0400)] 
Add event exclusion test for identical names

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoWarn when exclusion names are truncated
Philippe Proulx [Wed, 26 Aug 2015 22:13:23 +0000 (18:13 -0400)] 
Warn when exclusion names are truncated

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTruncate exclusion names to have a terminal '\0'
Philippe Proulx [Wed, 26 Aug 2015 22:11:46 +0000 (18:11 -0400)] 
Truncate exclusion names to have a terminal '\0'

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoIgnore exclusion names order when matching events
Philippe Proulx [Wed, 26 Aug 2015 05:47:15 +0000 (01:47 -0400)] 
Ignore exclusion names order when matching events

In other words:

    lttng enable-event -u -a --exclude a,b,c,d  ->  passes
    lttng enable-event -u -a --exclude a,c,d,b  ->  fails (same event)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agosessiond-comm.h: fix whitespaces
Philippe Proulx [Wed, 26 Aug 2015 05:26:10 +0000 (01:26 -0400)] 
sessiond-comm.h: fix whitespaces

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDisallow duplicate event exclusion names
Philippe Proulx [Wed, 26 Aug 2015 05:24:02 +0000 (01:24 -0400)] 
Disallow duplicate event exclusion names

This patch makes the session daemon disallow event
exclusion names sharing the same name when creating an
UST event, e.g.:

    lttng enable-event -u -a a,b,c,d  ->  allowed
    lttng enable-event -u -a a,b,a,d  ->  disallowed

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd LTTNG_EVENT_EXCLUSION_NAME_AT() helper macro
Philippe Proulx [Wed, 26 Aug 2015 05:20:24 +0000 (01:20 -0400)] 
Add LTTNG_EVENT_EXCLUSION_NAME_AT() helper macro

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: lay out names in exclusion structure correctly
Philippe Proulx [Wed, 26 Aug 2015 05:05:13 +0000 (01:05 -0400)] 
Fix: lay out names in exclusion structure correctly

This:

    char names[0][LTTNG_SYMBOL_NAME_LEN];

means that accessing

    ->names[0][i]

will return the i-th character of the first name.
So doing:

    lttng enable-event -u -a --exclude hello,a,b,c,d
    lttng save

would result in a saved session XML file containing
this:

    <exclusion>hello</exclusion>
    <exclusion>ello</exclusion>
    <exclusion>llo</exclusion>
    <exclusion>lo</exclusion>
    <exclusion>o</exclusion>

This is great art, but not what is expected.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Check for NULL hash tables on relay daemon teardown
Jérémie Galarneau [Mon, 2 Nov 2015 22:51:04 +0000 (17:51 -0500)] 
Fix: Check for NULL hash tables on relay daemon teardown

The relay daemon will log any "leaked" object on exit. However,
some errors encountered early-on during the daemon's
initialization may result in the teardown being executed with
uninitialized hash tables.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Verify directory's existence before calling mkdir
Jérémie Galarneau [Mon, 2 Nov 2015 16:39:59 +0000 (11:39 -0500)] 
Fix: Verify directory's existence before calling mkdir

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoClean-up: declare variables at beginning of scope
Jérémie Galarneau [Mon, 2 Nov 2015 21:46:16 +0000 (16:46 -0500)] 
Clean-up: declare variables at beginning of scope

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoLoad x86-exceptions lttng-modules probe
Mathieu Desnoyers [Fri, 23 Oct 2015 23:36:04 +0000 (19:36 -0400)] 
Load x86-exceptions lttng-modules probe

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoLoad x86-irq-vectors lttng-modules probe
Mathieu Desnoyers [Fri, 23 Oct 2015 22:47:11 +0000 (18:47 -0400)] 
Load x86-irq-vectors lttng-modules probe

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAgent: Make the agent protocol consistently network endian
Jérémie Galarneau [Fri, 23 Oct 2015 21:14:55 +0000 (17:14 -0400)] 
Agent: Make the agent protocol consistently network endian

Considering the Agent Protocol is bumped to v2.0 as of 2.8.x,
this patch revisits the unfortunate decision of communicating
in host-endianness from the session daemon to the agents, and
in big endian from the agents to the session daemon.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoClean-up: Remove unused variables from default.c
Jérémie Galarneau [Fri, 23 Oct 2015 01:38:08 +0000 (21:38 -0400)] 
Clean-up: Remove unused variables from default.c

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Unchecked NULL string in logging statement
Jérémie Galarneau [Fri, 23 Oct 2015 01:37:54 +0000 (21:37 -0400)] 
Fix: Unchecked NULL string in logging statement

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: include the filter expression in agent events' primary key
Alexandre Montplaisir [Fri, 11 Sep 2015 22:38:52 +0000 (18:38 -0400)] 
Fix: include the filter expression in agent events' primary key

Similar fix to a931962, but for filter expressions this time.

UST events's key already includes the filter bytecode, so adding the
string itself should not be needed.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd the filter expression to the enable_event agent protocol message
Alexandre Montplaisir [Wed, 9 Sep 2015 23:40:19 +0000 (19:40 -0400)] 
Add the filter expression to the enable_event agent protocol message

The filter expression is part of an event rule, so should be sent
along with the event name and log level.

This bumps the protocol version to 2.0, and will require UST agents
to be updated.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.042949 seconds and 4 git commands to generate.