lttng-tools.git
10 years agoFix: UST consumer sync all available metadata
David Goulet [Fri, 31 Oct 2014 17:23:29 +0000 (13:23 -0400)] 
Fix: UST consumer sync all available metadata

In live mode, the sync metadata function was only working on one single
metadata stream of a given session ID. However, we can have multiple
metadata stream for the same session ID thus failing to send the data in
live mode correctly for the other streams.

This fixes it by simply iterating over all metadata stream for a session
ID and syncing them all.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: remove bogus argument from prove invocation
Nathan Lynch [Tue, 28 Oct 2014 02:00:06 +0000 (21:00 -0500)] 
Test: remove bogus argument from prove invocation

An argument of "$2" was added to the prove command line in tests/run.sh
by 68270f0f604e "Mi test: Basic test structure". This is harmless since
run.sh is never called with more than one argument, but it is confusing,
and it breaks patches in OE that add support for running tests on the
target.

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: typo in pythong test Makefile
David Goulet [Sat, 25 Oct 2014 20:47:31 +0000 (16:47 -0400)] 
Fix: typo in pythong test Makefile

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: memory leak in libconfig
David Goulet [Thu, 23 Oct 2014 14:16:06 +0000 (10:16 -0400)] 
Fix: memory leak in libconfig

Fixes Coverity issue 1191755.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd Python agent support
David Goulet [Tue, 14 Oct 2014 15:15:22 +0000 (11:15 -0400)] 
Add Python agent support

Support the new Python agent shipped in liblttng-ust.

This adds the -p, --python option to the list and enable/disable-event
command to control the domain exactly like JUL and LOG4J.

The agent support is for the Python "logging" module.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: return EINVAL if agent registration fails
David Goulet [Tue, 7 Oct 2014 19:05:48 +0000 (15:05 -0400)] 
Fix: return EINVAL if agent registration fails

The errno value might be 0 thus not returning an error if so. It has
been seen with an unstable python agent code base which means it could
happen in the future if a third part decides to create an agent.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse lttng-modules ABI version ioctl
Mathieu Desnoyers [Mon, 20 Oct 2014 22:50:33 +0000 (18:50 -0400)] 
Use lttng-modules ABI version ioctl

Check compatibility between lttng-modules and tools using a version
numbering specifically for the ABI, rather than relying on the major
version of lttng-modules per se. This takes into account that we
sometimes depend on lock-step updates of the toolchain, including
tools and modules.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: syscall list ioctl number conflict
Mathieu Desnoyers [Mon, 20 Oct 2014 22:50:32 +0000 (18:50 -0400)] 
Fix: syscall list ioctl number conflict

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate master ChangeLog with 2.5.1 release
David Goulet [Mon, 20 Oct 2014 20:10:19 +0000 (16:10 -0400)] 
Update master ChangeLog with 2.5.1 release

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate version to v2.6.0-rc1 v2.6.0-rc1
David Goulet [Mon, 20 Oct 2014 17:17:42 +0000 (13:17 -0400)] 
Update version to v2.6.0-rc1

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate man page with LOG4J information
David Goulet [Mon, 20 Oct 2014 15:21:44 +0000 (11:21 -0400)] 
Update man page with LOG4J information

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd log4j values to mi XML schema
David Goulet [Mon, 20 Oct 2014 14:48:13 +0000 (10:48 -0400)] 
Add log4j values to mi XML schema

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add missing headers to makefile for dist tarball
David Goulet [Thu, 16 Oct 2014 16:18:00 +0000 (12:18 -0400)] 
Fix: add missing headers to makefile for dist tarball

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: initialize context list node on creation
David Goulet [Thu, 16 Oct 2014 15:16:07 +0000 (11:16 -0400)] 
Fix: initialize context list node on creation

This is to avoid a segfault when destroying a kernel context that has
not been added to a channel.

Fixes #845

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: update man page with log4j option
David Goulet [Wed, 15 Oct 2014 18:29:01 +0000 (14:29 -0400)] 
Fix: update man page with log4j option

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: support log4j loglevel in mi
David Goulet [Tue, 14 Oct 2014 18:43:29 +0000 (14:43 -0400)] 
Fix: support log4j loglevel in mi

To achieve this, a couple of functions needed to send the domain of the
event so we can use the right loglevel according to the domain.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add log4j domain to session.xsd
David Goulet [Tue, 14 Oct 2014 18:16:23 +0000 (14:16 -0400)] 
Fix: add log4j domain to session.xsd

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add log4j to lttng list help
David Goulet [Tue, 14 Oct 2014 15:30:59 +0000 (11:30 -0400)] 
Fix: add log4j to lttng list help

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Don't save an empty <contexts> node in kernel channels
Jérémie Galarneau [Mon, 6 Oct 2014 23:47:19 +0000 (19:47 -0400)] 
Fix: Don't save an empty <contexts> node in kernel channels

An empty <contexts/> node is saved when kernel channels are
saved even when no kernel contexts are enabled.

Note that this is a minor fix as the generated XML remains valid
anyhow.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: save UST context informations as a event_perf_context_type
Jérémie Galarneau [Mon, 6 Oct 2014 23:44:21 +0000 (19:44 -0400)] 
Fix: save UST context informations as a event_perf_context_type

This fixes UST perf counters not being recognized by the session
restore code at the linting stage.

Reported-by: Philipe Proulx <philippe.proulx@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: handle kernel event type correctly on enable
David Goulet [Fri, 3 Oct 2014 18:30:54 +0000 (14:30 -0400)] 
Fix: handle kernel event type correctly on enable

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: Add syscall listing
David Goulet [Fri, 3 Oct 2014 15:05:13 +0000 (11:05 -0400)] 
Test: Add syscall listing

For both available syscall and session event.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: set hidden attribute to all public mi functions
David Goulet [Wed, 1 Oct 2014 20:10:54 +0000 (16:10 -0400)] 
Fix: set hidden attribute to all public mi functions

Reported-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: set the hidden attribute to a filter function in liblttng-ctl
David Goulet [Wed, 1 Oct 2014 19:57:34 +0000 (15:57 -0400)] 
Fix: set the hidden attribute to a filter function in liblttng-ctl

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: handle sysconf possible negative returned value
David Goulet [Wed, 1 Oct 2014 18:57:36 +0000 (14:57 -0400)] 
Fix: handle sysconf possible negative returned value

Fixes Coverity issue 1019947.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: channel deref. after NULL check in kernel consumer
David Goulet [Wed, 1 Oct 2014 18:52:33 +0000 (14:52 -0400)] 
Fix: channel deref. after NULL check in kernel consumer

Fixes Coverity issue 1040158.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: check for kernel session metadata during init
David Goulet [Wed, 1 Oct 2014 18:49:42 +0000 (14:49 -0400)] 
Fix: check for kernel session metadata during init

Fixes Coverity issue 1040159.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: cmd snapshot record output can't be NULL
David Goulet [Wed, 1 Oct 2014 18:40:13 +0000 (14:40 -0400)] 
Fix: cmd snapshot record output can't be NULL

The session daemon calls cmd_record_snapshot always with a valid
pointer.

Fixes Coverity issue 1047269.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: incorrect cast in ust consumer assert
David Goulet [Wed, 1 Oct 2014 18:32:12 +0000 (14:32 -0400)] 
Fix: incorrect cast in ust consumer assert

Fixes Coverity issue 1068813.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove useless assert in relayd
David Goulet [Wed, 1 Oct 2014 18:27:26 +0000 (14:27 -0400)] 
Fix: remove useless assert in relayd

Fixes Coverity issue 1127095.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: bad handling of incoming data in consumer thread
David Goulet [Wed, 1 Oct 2014 18:16:07 +0000 (14:16 -0400)] 
Fix: bad handling of incoming data in consumer thread

This will fix Coverity issue 1019892.

The issue uncovered a more serious problem. The loop on ready FDs of the
thread was exiting at each branch thus not going on all fd. This is
problematic when the thread quit pipe is triggered and when there is
also at the same time a request for metadata from the consumer since the
metadata request could have been ignored.

This patch makes sure we go through all FDs in the loop when the thread
quit pipe or the metadata fd is triggered.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: detect size_t overflow in syscall table init
David Goulet [Wed, 1 Oct 2014 17:30:27 +0000 (13:30 -0400)] 
Fix: detect size_t overflow in syscall table init

Fixes Coverity issue 1242317.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove non existent header files from Makefile
David Goulet [Wed, 1 Oct 2014 17:00:36 +0000 (13:00 -0400)] 
Fix: remove non existent header files from Makefile

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: only initialize syscall table if kernel tracer available
David Goulet [Wed, 1 Oct 2014 15:30:15 +0000 (11:30 -0400)] 
Fix: only initialize syscall table if kernel tracer available

Fixes #844

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoModernize README with Markdown
Philippe Proulx [Wed, 17 Sep 2014 19:33:10 +0000 (15:33 -0400)] 
Modernize README with Markdown

This commit also:

  * adds a project description at the top
  * fixes a few grammar mistakes here and there
  * updates the Package contents list

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd --list-options to save/load command
David Goulet [Tue, 30 Sep 2014 17:31:43 +0000 (13:31 -0400)] 
Add --list-options to save/load command

Fixes #835

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: use max between index and nbmem for syscall table realloc
David Goulet [Tue, 30 Sep 2014 16:00:31 +0000 (12:00 -0400)] 
Fix: use max between index and nbmem for syscall table realloc

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: fd leak in inet accept call
David Goulet [Tue, 30 Sep 2014 15:59:49 +0000 (11:59 -0400)] 
Fix: fd leak in inet accept call

Fixes Coverity issue #1241799.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: add diag to each syscall test
David Goulet [Mon, 29 Sep 2014 19:06:56 +0000 (15:06 -0400)] 
Test: add diag to each syscall test

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoSupport syscall event in save session
David Goulet [Mon, 29 Sep 2014 14:55:33 +0000 (10:55 -0400)] 
Support syscall event in save session

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd syscall listing support
David Goulet [Mon, 22 Sep 2014 18:58:30 +0000 (14:58 -0400)] 
Add syscall listing support

This adds two things. First, a global syscall table populated at boot
time that is used to match which syscall is enabled or not using the
lttng kernel get mask call.

The second thing is the ability to list which syscall is enable or not
in a specific session. Keep in mind that for syscalls, NO state is kept
on the session daemon so we have to ask the kernel tracer which syscall
is enabled for a specific channel.

This introduce some changes to the API/ABI. First, an event flag is
added to the lttng_event data structure using 4 bytes of padding for an
enum value that can be ORed together in that field. This is used for now
to know which bitness the event is in case of a syscall event type.

Second, lttng_list_syscalls(...) is added to provide the ability to list
all available syscalls that the user can trace. To use that with the
lttng command line, "--syscall" is added to lttng list.

    $ lttng list -k --syscall

The above only lists available syscalls from the kernel tracer.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: change perror to PERROR in kernel consumer
David Goulet [Mon, 29 Sep 2014 13:38:42 +0000 (09:38 -0400)] 
Fix: change perror to PERROR in kernel consumer

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: syscall test: add missing semicolumns in match
Mathieu Desnoyers [Fri, 26 Sep 2014 00:52:27 +0000 (20:52 -0400)] 
Fix: syscall test: add missing semicolumns in match

Don't match the system call "openat" for instance.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: kernel consumer: issue put_subbuf on error
Mathieu Desnoyers [Fri, 26 Sep 2014 00:49:45 +0000 (20:49 -0400)] 
Fix: kernel consumer: issue put_subbuf on error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: add disable syscalls when none are enabled
Mathieu Desnoyers [Wed, 24 Sep 2014 16:18:19 +0000 (12:18 -0400)] 
Test: add disable syscalls when none are enabled

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement tests for kernel syscall tracing feature
Mathieu Desnoyers [Wed, 24 Sep 2014 01:19:07 +0000 (21:19 -0400)] 
Implement tests for kernel syscall tracing feature

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: syscall tracing: disable all and missing error handling
Mathieu Desnoyers [Wed, 24 Sep 2014 01:04:29 +0000 (21:04 -0400)] 
Fix: syscall tracing: disable all and missing error handling

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement kernctl_syscall_mask
Mathieu Desnoyers [Mon, 15 Sep 2014 19:07:02 +0000 (15:07 -0400)] 
Implement kernctl_syscall_mask

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImplement syscall mask ioctl
Mathieu Desnoyers [Mon, 15 Sep 2014 18:20:53 +0000 (14:20 -0400)] 
Implement syscall mask ioctl

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agolttng-modules ABI: syscall field "enable"
Mathieu Desnoyers [Fri, 12 Sep 2014 18:22:28 +0000 (14:22 -0400)] 
lttng-modules ABI: syscall field "enable"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd kernctl_syscall_list
Mathieu Desnoyers [Fri, 12 Sep 2014 16:10:29 +0000 (12:10 -0400)] 
Add kernctl_syscall_list

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoCleanup: Remove LTTNG_ENABLE_ALL_EVENT and LTTNG_DISABLE_ALL_EVENT
Mathieu Desnoyers [Wed, 10 Sep 2014 20:50:58 +0000 (16:50 -0400)] 
Cleanup: Remove LTTNG_ENABLE_ALL_EVENT and LTTNG_DISABLE_ALL_EVENT

Cleanup lttng-ctl to session daemon communication protocol, and cleanup
session daemon code (remove dead code).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImplement support for lttng-modules syscall filtering
Mathieu Desnoyers [Tue, 9 Sep 2014 22:56:13 +0000 (18:56 -0400)] 
Implement support for lttng-modules syscall filtering

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoSupport lttng-modules syscall filtering in enable-event
Mathieu Desnoyers [Sat, 19 Jul 2014 21:16:22 +0000 (17:16 -0400)] 
Support lttng-modules syscall filtering in enable-event

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix out-of-tree build
Simon Marchi [Sat, 20 Sep 2014 01:29:23 +0000 (21:29 -0400)] 
Fix out-of-tree build

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Propagate socket timeouts on lttcomm_accept_inet_sock()
Jérémie Galarneau [Tue, 23 Sep 2014 21:46:32 +0000 (17:46 -0400)] 
Fix: Propagate socket timeouts on lttcomm_accept_inet_sock()

Ensure that send/recv timeouts are applied to new sockets created
from a lttcomm_accept_inet_sock().

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: report UST consumer channel creation error
Mathieu Desnoyers [Mon, 22 Sep 2014 16:39:08 +0000 (12:39 -0400)] 
Fix: report UST consumer channel creation error

The session daemon reports no error whatsoever when the consumer daemon
fails to create a channel. We don't want to print errors when failing to
send the channel to the UST application though, because the application
may be concurrently exiting. So only print those errors when receiving
reply from the consumerd.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: Add the new log4j agent
David Goulet [Mon, 15 Sep 2014 19:22:12 +0000 (15:22 -0400)] 
Test: Add the new log4j agent

This adds the log4j java agent test.

It also moves the JUL test and build system to use the new UST java
agent jar.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: memory leak in load session thread
David Goulet [Mon, 22 Sep 2014 15:05:06 +0000 (11:05 -0400)] 
Fix: memory leak in load session thread

Fixes Coverity issue 1213789.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: kernel context memory leak on error
David Goulet [Mon, 22 Sep 2014 15:03:24 +0000 (11:03 -0400)] 
Fix: kernel context memory leak on error

Fixes Coverity issue 1223776.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: possible file descriptor leak in error path
David Goulet [Mon, 22 Sep 2014 14:55:52 +0000 (10:55 -0400)] 
Fix: possible file descriptor leak in error path

Fixes Coverity issue 1225086.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: use after free in agent subsystem
David Goulet [Mon, 22 Sep 2014 14:50:42 +0000 (10:50 -0400)] 
Fix: use after free in agent subsystem

Fixes Coverity issue 1230592.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd version to agent registration message
David Goulet [Fri, 19 Sep 2014 17:58:31 +0000 (13:58 -0400)] 
Add version to agent registration message

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: ignore error when loading optional kmod
Philippe Proulx [Mon, 15 Sep 2014 17:43:56 +0000 (13:43 -0400)] 
Fix: ignore error when loading optional kmod

This commit also improves the accuracy of debug messages: a module is
not "successfully" loaded when it's optional and actually not loaded.

Fixes: #837
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agosessiond: Add --extra-kmod-probes option
Philippe Proulx [Sat, 13 Sep 2014 01:37:18 +0000 (21:37 -0400)] 
sessiond: Add --extra-kmod-probes option

This patch adds the --extra-kmod-probes option to lttng-sessiond. The
LTTNG_EXTRA_KMOD_PROBES environment variable may also be used.

The option specifies a list of extra probe kernel modules to be loaded
(and unloaded) by lttng-sessiond. The list is appended to either the
default list or to the user-supplied --kmod-probes list.

This option is especially useful for kernel developers who need the
default LTTng kernel probes plus additional probes in order to
instrument their custom kernel or module. This becomes easy with
--extra-kmod-probes:

    lttng-sessiond --extra-kmod-probes=custom_subsys,other

would load all known and available LTTng kernel probes plus
lttng_probe_custom_subsys and lttng_probe_other.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove break in lttng cmdline session listing
David Goulet [Thu, 18 Sep 2014 19:38:18 +0000 (15:38 -0400)] 
Fix: remove break in lttng cmdline session listing

This was causing to only list the first session with a "lttng list"
command.

Reported-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: use default agent channel name in disable event
David Goulet [Mon, 15 Sep 2014 19:20:51 +0000 (15:20 -0400)] 
Fix: use default agent channel name in disable event

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRemove enable/disable consumer obsolete command
David Goulet [Thu, 11 Sep 2014 18:26:10 +0000 (14:26 -0400)] 
Remove enable/disable consumer obsolete command

They've been obsolete for quite some time now so just remove any
reference and file to get rid of it.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd log4j default event and channel name handling
David Goulet [Tue, 9 Sep 2014 15:22:50 +0000 (11:22 -0400)] 
Add log4j default event and channel name handling

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove an odd no name directory from the test tree
David Goulet [Wed, 10 Sep 2014 20:38:04 +0000 (16:38 -0400)] 
Fix: remove an odd no name directory from the test tree

Reported-by: Daniel Thibault <Daniel.Thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: move easter egg after arg parsing else it breaks the mi test
David Goulet [Wed, 10 Sep 2014 16:16:48 +0000 (12:16 -0400)] 
Fix: move easter egg after arg parsing else it breaks the mi test

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoLoad modules through kmod
Umut Tezduyar Lindskog [Thu, 4 Sep 2014 08:30:53 +0000 (10:30 +0200)] 
Load modules through kmod

Instead of forking processes, load modules through libkmod.

This adds an optional package dependency to kmod but can be disabled by
--disable-kmod option in ./configure. If --enable-kmod option is given
but no kmod is found, loading will happen by forking a process.

The startup time has decreased by %36 on our embedded mips product. The
measurement is done by cgroup cpu shares.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd cscope files to gitignore
David Goulet [Mon, 8 Sep 2014 18:50:06 +0000 (14:50 -0400)] 
Add cscope files to gitignore

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: list agent event per domain only
David Goulet [Fri, 5 Sep 2014 19:29:23 +0000 (15:29 -0400)] 
Fix: list agent event per domain only

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: typo in lttng list command for log4j
David Goulet [Fri, 5 Sep 2014 19:24:58 +0000 (15:24 -0400)] 
Fix: typo in lttng list command for log4j

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: add disable-event JUL tests
David Goulet [Fri, 5 Sep 2014 16:16:18 +0000 (12:16 -0400)] 
Test: add disable-event JUL tests

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: disable-event for an agent domain
David Goulet [Fri, 5 Sep 2014 16:13:55 +0000 (12:13 -0400)] 
Fix: disable-event for an agent domain

This fixes the disable-event command for an agent that was not working
properly in the case an application was spawned after the command.

Also, for the disable all event command for an agent, the disable
command will try first to disable the '*' event and will disable all
already existing events after. This is to make sure the refcount on the
agent side is synchronized with the amount of enable event prior.

Fixes #831

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: send disable ALL command code if event is *
David Goulet [Fri, 5 Sep 2014 16:12:38 +0000 (12:12 -0400)] 
Fix: send disable ALL command code if event is *

$ lttng disable-event -a
and
$ lttng disable-event '*'

Both commands should do the same meaning send the DISABLE_EVENT_ALL
command to the session daemon.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: make sure no index is in flight before using inactivity beacons
Julien Desfossez [Wed, 27 Aug 2014 17:59:21 +0000 (13:59 -0400)] 
Fix: make sure no index is in flight before using inactivity beacons

Since the index is sent in two parts on two separate connections from
the consumer, there can be cases where we receive an inactivity beacon
between the index creation and the data reception.

This fix prevents from using the inactivity beacon if we know a data
index is coming.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: Validate that filters may be used with JUL's logger_name filtering
Jérémie Galarneau [Thu, 28 Aug 2014 16:53:44 +0000 (12:53 -0400)] 
Tests: Validate that filters may be used with JUL's logger_name filtering

This test validates that custom filters may be used on JUL events
without interfering with the implicit filtering done on the logger_name
field.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Parenthesize previous statement when adding conditions to a filter
Jérémie Galarneau [Thu, 28 Aug 2014 16:53:43 +0000 (12:53 -0400)] 
Fix: Parenthesize previous statement when adding conditions to a filter

Not parenthesizing the clauses in a filter string causes JUL events to be
traced even though they are not enabled when an enable-event command is
issued with a filter and the --loglevel-only option.

For instance,

lttng enable-event -j "my_event" --loglevel-only JUL_CONFIG -f "int_loglevel > 0 || int_loglevel < 0"

results in the following filter being applied:

int_loglevel > 0 || int_loglevel < 0 && logger_name == "my_event" && int_loglevel == 700

The resulting expression will always evaluate to true, regardless of the logger
name.

This fix parenthesizes each clause to ensure they are all independently
evaluated and not unintuitively affected by operator precedence.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: mi print of probe attributes + validation
Jonathan Rajotte Julien [Thu, 28 Aug 2014 20:51:09 +0000 (16:51 -0400)] 
Fix: mi print of probe attributes + validation

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: parse_prob_opts return the actual success of the function
Jonathan Rajotte Julien [Wed, 27 Aug 2014 19:46:57 +0000 (15:46 -0400)] 
Fix: parse_prob_opts return the actual success of the function

This bug have been triggered by the mi merging and the use of a
command_ret in enable_events functions. Previously, enable_events was
reusing the ret variable for another operation and always replacing ret.
Parse_probe_event returned the last output of sscanf which represent
the number of match and not the success of the operation.

Fixes #830

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: list without a name is not an error
Jonathan Rajotte Julien [Fri, 22 Aug 2014 20:25:47 +0000 (16:25 -0400)] 
Fix: list without a name is not an error

Fixes #829

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: add match only event utils function
David Goulet [Wed, 3 Sep 2014 18:21:41 +0000 (14:21 -0400)] 
Test: add match only event utils function

This is linked to #831 where the JUL disable event test was NOT failing
but was using a bogus trace match function. It should have match a
specific number of event only.

This commit makes the test java JUL fail.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Man page typos
Jérémie Galarneau [Thu, 14 Aug 2014 20:17:22 +0000 (16:17 -0400)] 
Fix: Man page typos

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agofix: mi: xsd: wrong comment for context_type_type
Jonathan Rajotte Julien [Wed, 13 Aug 2014 20:58:29 +0000 (16:58 -0400)] 
fix: mi: xsd: wrong comment for context_type_type

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoMi & save/load: add option to indent or not on config writer creation
Jonathan Rajotte Julien [Wed, 6 Aug 2014 14:13:48 +0000 (10:13 -0400)] 
Mi & save/load: add option to indent or not on config writer creation

The presence of tabulation and newline in mi is irrelevant and can
impact client performance. The parsing & processing of a lot of data
from mi with many /t and /n impact performance. This aim to fix the
problem at the source. Style is useless for machine.

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove racy wait_app from JUL tests
David Goulet [Tue, 12 Aug 2014 15:41:36 +0000 (11:41 -0400)] 
Fix: remove racy wait_app from JUL tests

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdding log4j agent support
David Goulet [Mon, 4 Aug 2014 19:08:38 +0000 (15:08 -0400)] 
Adding log4j agent support

This adds the log4j domain to the public ABI and "-l, --log4j" option in
the lttng command line tool to be able to use it.

Note that at this commit, the JUL default channel and event name are
used for the log4j domain. That might become specific to the domain in
the long run.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoChange --jul-port-tcp and jul.port to use agent namespace
David Goulet [Wed, 30 Jul 2014 18:12:09 +0000 (14:12 -0400)] 
Change --jul-port-tcp and jul.port to use agent namespace

They are both renamed to --agent-port-tcp and "agent.port" file.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd the support for multiple agent
David Goulet [Wed, 30 Jul 2014 18:03:26 +0000 (14:03 -0400)] 
Add the support for multiple agent

For this, a new field has been added to the register message, the domain
type. Agent object and agent application object have now a domain type
so we can enable/disable the right event for the right agent for a
client command or during an application registration.

The "jevent" name has been renamed to "aevent" so further remove the
concept of Java event.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRefactor JUL to agent namespace
David Goulet [Mon, 28 Jul 2014 20:06:35 +0000 (16:06 -0400)] 
Refactor JUL to agent namespace

The specific JUL concept has been removed and it is now "agent" objects.
This is the first step to support multiple agents within the same
subsystem.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest: Ensure wildcards may only appear last in a string literal
Jérémie Galarneau [Mon, 4 Aug 2014 18:10:28 +0000 (14:10 -0400)] 
Test: Ensure wildcards may only appear last in a string literal

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoDisallow wildcards in event names except as the last character
Jérémie Galarneau [Mon, 4 Aug 2014 18:10:29 +0000 (14:10 -0400)] 
Disallow wildcards in event names except as the last character

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoWarn that wildcards must be used as the last character in a string
Jérémie Galarneau [Mon, 4 Aug 2014 18:10:27 +0000 (14:10 -0400)] 
Warn that wildcards must be used as the last character in a string

Wildcards are currently only supported as the last character in a string
literal used in an event filter. This rule is not checked which may
confuse users who expect complete wildcard support in filter
expressions.

An error is now reported and the filter string is treated as invalid.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: disable JUL event on destroy
David Goulet [Tue, 29 Jul 2014 18:11:48 +0000 (14:11 -0400)] 
Fix: disable JUL event on destroy

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: git version build system integration (v2)
Mathieu Desnoyers [Tue, 29 Jul 2014 22:36:51 +0000 (18:36 -0400)] 
Fix: git version build system integration (v2)

Fix:
- Don't overwrite version.h if the previous content matches.
- While we are there, if we notice the previous content matches,
  print a (cached) message to show that we do not overwrite the
  content.
- Introduce LTTNG_TOOLS_BUILD_GIT_SOURCE automake conditional rather
  than compile-time define to disable the feature. It ensures we
  do not invoke "git describe" when configure --disable-git-version
  has been requested.
- Use git describe rather than git describe --long --all. Based
  on the last tag, and adds the first numbers of git revision.
  Last tag is useful both to the developer and in a bug report,
  whereas the branch name returned by --long --all is meaningless
  in a bug report.
- We want to ship version.h.tmpl in the tarball (make dist), not
  version.h which is generated. Someone could very well do a
  git init on the extracted tarball and want to have git tracking
  support.
- Fix the git prefix " - " that is incorrectly printed in some
  situations, e.g. when GIT_SOURCE was active, but we are in
  a non-git tree (or git is not available).
- Fix incorrect handling of out of tree build. Invoke git describe from
  top_srcdir.

Changelog since v1:
- Add missing comma for lttng usage output.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: out of tree build by adding missing ini.c include
Mathieu Desnoyers [Tue, 29 Jul 2014 22:10:27 +0000 (18:10 -0400)] 
Fix: out of tree build by adding missing ini.c include

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: mi: missing files on make dist
Jonathan Rajotte Julien [Tue, 29 Jul 2014 19:24:16 +0000 (15:24 -0400)] 
Fix: mi: missing files on make dist

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.041936 seconds and 4 git commands to generate.