lttng-tools.git
11 years agoLive timer set up
Julien Desfossez [Sun, 28 Jul 2013 22:03:47 +0000 (18:03 -0400)] 
Live timer set up

Add a new option to create to enable the live_timer being --live at
session creation. A new API call is added also to create as session in
live mode like the snapshot feature.

This timer is responsible to check all streams of a live session and
make sure the viewer receives periodic updates even for low-throughput
channels.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoBump version to 2.4.0-pre1
Julien Desfossez [Mon, 5 Aug 2013 19:48:15 +0000 (15:48 -0400)] 
Bump version to 2.4.0-pre1

We need to bump the version early in the development cycle since we
extend the relayd protocol.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoGenerate local kernel and UST indexes
Julien Desfossez [Thu, 8 Aug 2013 20:54:48 +0000 (16:54 -0400)] 
Generate local kernel and UST indexes

When the consumer creates a new trace file, it now creates as well an
index file that the viewers can use to navigate in the trace.  For now
these indexes are only local and not sent to the relayd.

This patch requires additionnal ioctl and ustctl calls implemented in
lttng-modules and lttng-ust in 2.4.

For now, no indexes are sent over the network and no indexes are
generated on snaphots.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd support for non unique add string in hashtable
Julien Desfossez [Wed, 28 Aug 2013 18:03:16 +0000 (14:03 -0400)] 
Add support for non unique add string in hashtable

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix typo in lttng snapshot add-output example of lttng(1)
Christian Babeux [Wed, 25 Sep 2013 14:06:05 +0000 (10:06 -0400)] 
Fix typo in lttng snapshot add-output example of lttng(1)

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add UST snapshots streaming test with custom URI
Christian Babeux [Mon, 9 Sep 2013 22:10:40 +0000 (18:10 -0400)] 
Tests: Add UST snapshots streaming test with custom URI

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add UST snapshots list output and max-size tests
Christian Babeux [Mon, 9 Sep 2013 22:09:38 +0000 (18:09 -0400)] 
Tests: Add UST snapshots list output and max-size tests

Add two new tests to the UST snapshots tests:

test_ust_list_output:
Add/remove named outputs and validate with the list output command.

test_ust_local_snapshot_max_size:
Take a UST snapshot with max-size limits and validate that they are respected.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoEnable support for installcheck.
Stefan Seefeld [Thu, 12 Sep 2013 00:37:41 +0000 (20:37 -0400)] 
Enable support for installcheck.

Enable execution of tests via `make installcheck`, i.e. against a fully
installed
LTTng.

The patch simply adds the same rule to the installcheck target that is
used for check.  Testing with an OpenEmbedded build shows the unit_tests
suite to work fine, while the fast_regression suite contains many
failures not present when run as `make check`.

Stefan Seefeld (1):
  Enable support for installcheck.

Signed-off-by: Stefan Seefeld <stefan_seefeld@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd original snapshot proposal to documentation
David Goulet [Wed, 11 Sep 2013 15:08:51 +0000 (11:08 -0400)] 
Add original snapshot proposal to documentation

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUpdate version to v2.3.0 v2.3.0
David Goulet [Wed, 4 Sep 2013 01:25:31 +0000 (21:25 -0400)] 
Update version to v2.3.0

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: remove periodical flush test from make check
David Goulet [Tue, 3 Sep 2013 21:50:34 +0000 (17:50 -0400)] 
Fix: remove periodical flush test from make check

This test is racy for the following reasons. It expects that the
subbuffer flush timer always produce a coherent trace after a period of
time but this cannot be guaranteed without the upcoming live feature.

A test based on time expectation is a bit flacky so disable it for now
until we have live tracing.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUpdate version to v2.3.0-rc3 v2.3.0-rc3
David Goulet [Fri, 30 Aug 2013 19:09:39 +0000 (15:09 -0400)] 
Update version to v2.3.0-rc3

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: hashtable: take split_count_order into account
Mathieu Desnoyers [Fri, 30 Aug 2013 18:31:48 +0000 (14:31 -0400)] 
Fix: hashtable: take split_count_order into account

This makes check_resize() handle split-counters more precisely.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: remove wrong doing asserts in sessiond
David Goulet [Fri, 30 Aug 2013 14:04:16 +0000 (10:04 -0400)] 
Fix: remove wrong doing asserts in sessiond

Asserting on the fd and socket was wrong since the two fds can be set to
-1 concurrently when calling this function.

Fixes #624

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: fix periodical flush tests to stop app
David Goulet [Thu, 29 Aug 2013 21:48:47 +0000 (17:48 -0400)] 
Tests: fix periodical flush tests to stop app

The test now SIGSTOP the application before validating the trace and
once done, SIGKILL them. This way we make sure we test the periodical
flush feature by letting the application live, stopping it from creating
more events and validating the flush.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: correctly close metadata on sessiond thread shutdown
David Goulet [Thu, 29 Aug 2013 21:40:58 +0000 (17:40 -0400)] 
Fix: correctly close metadata on sessiond thread shutdown

Introduce a _close_metadata() function that does not take any locks so
it can be used by multiple call sites with different locking scheme.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: delete the trace directory used for the test
David Goulet [Thu, 29 Aug 2013 14:49:24 +0000 (10:49 -0400)] 
Fix: delete the trace directory used for the test

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: remove bad check after epoll wait in consumer
David Goulet [Thu, 29 Aug 2013 14:38:12 +0000 (10:38 -0400)] 
Fix: remove bad check after epoll wait in consumer

The returned nb_fd value is the number of FD ready for the requested I/O
so having and revents set to 0 is possible since not all fd are ready
thus making this check irrelevant and actually ressource consuming.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: missing data pending signess conversion
David Goulet [Thu, 29 Aug 2013 13:48:43 +0000 (09:48 -0400)] 
Fix: missing data pending signess conversion

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: consumer data pending for empty streams
Mathieu Desnoyers [Thu, 29 Aug 2013 02:47:20 +0000 (22:47 -0400)] 
Fix: consumer data pending for empty streams

We should at least output one packet before a stream can be considered
as readable. So far, for PID buffers, if an application exits at the
wrong timing before a stop waiting for data pending, empty streams could
be visible by a babeltrace executed after data pending incorrectly
returned false.

Fix it by considering a stream for which the consumerd has written 0
bytes to the output as having data pending.

This applies to 2.3-rc and stable-2.2.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: hash table growth (for small tables) should be limited (v2)
Mathieu Desnoyers [Tue, 27 Aug 2013 22:11:04 +0000 (18:11 -0400)] 
Fix: hash table growth (for small tables) should be limited (v2)

Buckets with many entries encountered in a hash table could cause it to
grow to a large size, beyond the scope for which this mechanism is
expected to play a role when node accounting is available. Indeed, when
the hash table grows to larger size, split-counter node accounting is
expected to deal with resize/shrink rather than relying on an heuristic
based on the largest bucket size.

This is fixing an issue where we see hash tables sometimes reaching 65k
entries index (65536*8 = 524288 bytes) for a workload limited to adding
1000 entries and then removing all of them, done in a loop (random
keys).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: run_as gid/uid test should return result to parent
Mathieu Desnoyers [Tue, 27 Aug 2013 20:24:55 +0000 (16:24 -0400)] 
Fix: run_as gid/uid test should return result to parent

Failure to do so could cause the parent to hang on read() waiting for
the return value from the child.

Targets: 2.3-rc and stable-2.2 branches.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: missing check for metadata data pending
David Goulet [Tue, 27 Aug 2013 21:30:51 +0000 (17:30 -0400)] 
Fix: missing check for metadata data pending

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: change buffers UID test to PID
David Goulet [Tue, 27 Aug 2013 21:30:45 +0000 (17:30 -0400)] 
Tests: change buffers UID test to PID

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: fix health tests to use custom socket timeout
David Goulet [Tue, 27 Aug 2013 20:12:39 +0000 (16:12 -0400)] 
Tests: fix health tests to use custom socket timeout

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: remove health test from fast regression
David Goulet [Tue, 27 Aug 2013 20:06:44 +0000 (16:06 -0400)] 
Fix: remove health test from fast regression

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUse socket timeout value for tcp timeout if available
David Goulet [Tue, 27 Aug 2013 20:04:36 +0000 (16:04 -0400)] 
Use socket timeout value for tcp timeout if available

Make the inet subsystem initialize the tcp timeout value with the env.
variable LTTNG_NETWORK_SOCKET_TIMEOUT if available.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: set the health delta tcp timeout aware
David Goulet [Tue, 27 Aug 2013 19:23:18 +0000 (15:23 -0400)] 
Fix: set the health delta tcp timeout aware

The health check subsystem now initialized the time delta using the TCP
timeout. It takes the maximum value between our default internal delta
and the TCP timeout fetched by the lttcomm inet subsytem.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoGet the maximum TCP timeout in sessiond
David Goulet [Tue, 27 Aug 2013 19:11:40 +0000 (15:11 -0400)] 
Get the maximum TCP timeout in sessiond

This actually just open some /proc files when calling
lttcomm_init_inet() and computes the maximum value a TCP timeout for
every possible operations (send/recv/connect).

This is the first patch to fix the health check issue of having a
smaller delta than the TCP maximum possible timeout.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: don't report error if UST app dies
David Goulet [Tue, 27 Aug 2013 17:56:57 +0000 (13:56 -0400)] 
Fix: don't report error if UST app dies

An application dying unexpectedly is a normal behavior so the execution
must continue and not report an error when sending commands onto the
dying application.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: support VPATH build for tests
David Goulet [Mon, 26 Aug 2013 20:21:18 +0000 (16:21 -0400)] 
Fix: support VPATH build for tests

Fixes #613

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoImprove comments after review
David Goulet [Mon, 26 Aug 2013 19:34:06 +0000 (15:34 -0400)] 
Improve comments after review

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoRename consumer socket fd to fd_ptr
David Goulet [Mon, 26 Aug 2013 19:18:44 +0000 (15:18 -0400)] 
Rename consumer socket fd to fd_ptr

By renaming this value, first the name as a better semantic and second
we are able to find every callsite that uses this variable thus making
sure we don't forget any assert or check made on it.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoLock consumer data before fd check during destroy
David Goulet [Mon, 26 Aug 2013 17:28:04 +0000 (13:28 -0400)] 
Lock consumer data before fd check during destroy

Also, a consumer state error is added just before update UST
applications on registration.

Fixes #595

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUse single callsite for send/recv ops. for consumer in sessiond
David Goulet [Mon, 26 Aug 2013 17:11:39 +0000 (13:11 -0400)] 
Use single callsite for send/recv ops. for consumer in sessiond

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUse consumer fd reference in consumer socket obj
David Goulet [Mon, 26 Aug 2013 16:26:10 +0000 (12:26 -0400)] 
Use consumer fd reference in consumer socket obj

This is done so we don't copy the fd value of the consumer thus having a
central control. This is part of a set of patches that makes the session
daemon stop sending command to an invalid consumer (dead, closed).

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUpdate bash completion
Simon Marchi [Tue, 13 Aug 2013 20:26:24 +0000 (16:26 -0400)] 
Update bash completion

- Refactor options completion to remove a little bit of code
  duplication.
- Add subcommand completion for the snapshot command. It is not perfect,
  but it's a start.
- Add some comments to functions here and there.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd --list-commands option to the snapshot command
Simon Marchi [Tue, 13 Aug 2013 20:26:23 +0000 (16:26 -0400)] 
Add --list-commands option to the snapshot command

It lists snapshot sub-commands. This involves moving list_commands
to utils so that commands can use it.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoReorder functions _lttng_cmd_* functions in bash completion
Simon Marchi [Tue, 13 Aug 2013 20:26:22 +0000 (16:26 -0400)] 
Reorder functions _lttng_cmd_* functions in bash completion

Simply reorder them alphabetically to be consistent.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUse parse_size_suffix in snapshot
Simon Marchi [Tue, 13 Aug 2013 18:22:31 +0000 (14:22 -0400)] 
Use parse_size_suffix in snapshot

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: snapshot record error handling
David Goulet [Fri, 23 Aug 2013 19:00:36 +0000 (15:00 -0400)] 
Fix: snapshot record error handling

Fixes #617

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: improve error message when UST support is disabled
Mathieu Desnoyers [Thu, 22 Aug 2013 21:48:59 +0000 (17:48 -0400)] 
Fix: improve error message when UST support is disabled

Fixes #583

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add missing short filter option in help
David Goulet [Thu, 22 Aug 2013 21:04:08 +0000 (17:04 -0400)] 
Fix: add missing short filter option in help

Fixes #587

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: typo in configure.ac for version check
David Goulet [Thu, 22 Aug 2013 20:59:21 +0000 (16:59 -0400)] 
Fix: typo in configure.ac for version check

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: remove calibrate syscall option from code
David Goulet [Thu, 22 Aug 2013 20:56:22 +0000 (16:56 -0400)] 
Fix: remove calibrate syscall option from code

Fixes #586

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: snapshot should fail if no successful snapshot is taken
Mathieu Desnoyers [Thu, 22 Aug 2013 20:46:58 +0000 (16:46 -0400)] 
Fix: snapshot should fail if no successful snapshot is taken

Fixes #606, #608

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: check UST float field mantissa length
Mathieu Desnoyers [Thu, 22 Aug 2013 20:05:58 +0000 (16:05 -0400)] 
Fix: check UST float field mantissa length

Fixes #473

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: add UST context in the same order the user enabled them
David Goulet [Wed, 21 Aug 2013 16:04:02 +0000 (12:04 -0400)] 
Fix: add UST context in the same order the user enabled them

This is to avoid having different field order in different traces for
the same contexts enabled in the same order by the user.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoIntroduce configure --with-lttng-system-rundir
Mathieu Desnoyers [Mon, 19 Aug 2013 19:03:27 +0000 (15:03 -0400)] 
Introduce configure --with-lttng-system-rundir

Allow overriding the path where the system-wide sessiond keeps its
runtime files.

It does _not_ allow multiple instances of system-wide sessiond to run in
parallel though, because the wait shm files still requires having only
one single system-wide sessiond at any given time.

Fixes #521

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd .dirstamp to gitignore file
David Goulet [Mon, 19 Aug 2013 16:09:40 +0000 (12:09 -0400)] 
Add .dirstamp to gitignore file

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: snapshot with multiple UIDs
David Goulet [Mon, 19 Aug 2013 16:08:06 +0000 (12:08 -0400)] 
Fix: snapshot with multiple UIDs

This commit refs #615. Waiting on the confirmation of the author to
close it.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoPrepare for automake deprecation of missing subdir-objects
Mathieu Desnoyers [Fri, 16 Aug 2013 21:35:38 +0000 (17:35 -0400)] 
Prepare for automake deprecation of missing subdir-objects

Ensure old and new automake will behave in the same way.

Fixes #594

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: typos in --help and manpage
Mathieu Desnoyers [Fri, 16 Aug 2013 21:18:12 +0000 (17:18 -0400)] 
Fix: typos in --help and manpage

Fixes #604

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add-context without -c apply to all channels
Mathieu Desnoyers [Fri, 16 Aug 2013 21:10:52 +0000 (17:10 -0400)] 
Fix: add-context without -c apply to all channels

Fixes #618

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: channels can be _enabled_ after tracing is started, but not created
Mathieu Desnoyers [Fri, 16 Aug 2013 20:58:02 +0000 (16:58 -0400)] 
Fix: channels can be _enabled_ after tracing is started, but not created

Fixes #619

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix filter parser segmentation fault with bison 3.0
Zifei Tong [Fri, 16 Aug 2013 20:52:21 +0000 (16:52 -0400)] 
Fix filter parser segmentation fault with bison 3.0

Replace deprecated YYLEX_PARAM with %lex-param

Tested with bison 2.4, 2.5, 2.7 and 3.0.

Signed-off-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: typo in error msg
Mathieu Desnoyers [Fri, 16 Aug 2013 20:50:43 +0000 (16:50 -0400)] 
Fix: typo in error msg

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: imprecise error message about root sessiond/tracing group
Mathieu Desnoyers [Fri, 16 Aug 2013 20:48:08 +0000 (16:48 -0400)] 
Fix: imprecise error message about root sessiond/tracing group

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: don't skip chmod if tracing group is not found
Mathieu Desnoyers [Fri, 16 Aug 2013 20:07:54 +0000 (16:07 -0400)] 
Fix: don't skip chmod if tracing group is not found

Fixes #620

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTracepoint probes don't need extern C
Mathieu Desnoyers [Thu, 15 Aug 2013 18:11:16 +0000 (14:11 -0400)] 
Tracepoint probes don't need extern C

tracepoint.h has the proper extern C guards, so every liblttng-ust API
called from the probe has the proper linkage.

The rest of the symbols are only meaningful within the probe, so we
don't care if they are mangled or not.

This fixes all UST applications in tests/

Fixes #597

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Snapshot should be taken asap in core handler script
Christian Babeux [Thu, 15 Aug 2013 17:03:36 +0000 (13:03 -0400)] 
Fix: Snapshot should be taken asap in core handler script

Taking a snapshot should be the first thing the core handler does.
An enormous core file write to disk could potentially discard a lot
of tracing data if done before the snapshot.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: reset out_fd_offset when we rotate the trace file
Julien Desfossez [Tue, 13 Aug 2013 21:40:28 +0000 (17:40 -0400)] 
Fix: reset out_fd_offset when we rotate the trace file

This value is only used for the sync_file_range, but it has to be set
to 0 when we start to write in a new trace file, otherwise the values
passed to this call are bogus.

Applied to 2.3, but could probably be backported to 2.2.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: LTTNG_ERR_NEED_ROOT_SESSIOND error message
Jérémie Galarneau [Wed, 7 Aug 2013 18:58:05 +0000 (14:58 -0400)] 
Fix: LTTNG_ERR_NEED_ROOT_SESSIOND error message

A root session daemon _and_ "tracing" group user membership are required
to trace the kernel.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoinet/inet6 sockets: apply timeout
Mathieu Desnoyers [Thu, 8 Aug 2013 09:02:30 +0000 (05:02 -0400)] 
inet/inet6 sockets: apply timeout

Close #546

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoImplement timeout for connect ipv4/ipv6
Mathieu Desnoyers [Thu, 8 Aug 2013 09:01:53 +0000 (05:01 -0400)] 
Implement timeout for connect ipv4/ipv6

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoIntroduce LTTNG_NETWORK_SOCKET_TIMEOUT env. var
Mathieu Desnoyers [Wed, 7 Aug 2013 09:26:51 +0000 (05:26 -0400)] 
Introduce LTTNG_NETWORK_SOCKET_TIMEOUT env. var

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agobash completion: add calls to _lttng_complete_sessions
Simon Marchi [Mon, 29 Jul 2013 19:22:45 +0000 (15:22 -0400)] 
bash completion: add calls to _lttng_complete_sessions

Improve a little bit the dummy implementation of
_lttng_complete_sessions and add two calls where it can be useful.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agobash completion: Fix copy-paste typo
Simon Marchi [Mon, 29 Jul 2013 19:22:44 +0000 (15:22 -0400)] 
bash completion: Fix copy-paste typo

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoExtras: Remove deprecated consumer commands in bash completion
Simon Marchi [Mon, 29 Jul 2013 19:22:43 +0000 (15:22 -0400)] 
Extras: Remove deprecated consumer commands in bash completion

enable/disable consumer were removed a while ago. Remove autocomplete
for them to discourage people of using them.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agobash completion: Remove underscores in handler function names
Simon Marchi [Mon, 29 Jul 2013 19:22:42 +0000 (15:22 -0400)] 
bash completion: Remove underscores in handler function names

If the command name contains a dash, it is removed to derive the
function name that will handle completion. For example, add-context
becomes _lttng_cmd_addcontext. The functions with erroneous names
were not getting called.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agobash completion: Remove --event for add-context
Simon Marchi [Mon, 29 Jul 2013 19:22:41 +0000 (15:22 -0400)] 
bash completion: Remove --event for add-context

--event has been remove in 601d5acf42ebdb05ff8aa19f12fd9bdad3602781.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
11 years agoUpdate gitignore
David Goulet [Tue, 6 Aug 2013 10:34:28 +0000 (06:34 -0400)] 
Update gitignore

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agorelayd: use version macros from build rather than scanf
Mathieu Desnoyers [Mon, 5 Aug 2013 19:26:41 +0000 (15:26 -0400)] 
relayd: use version macros from build rather than scanf

Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agosessiond: use version major/minor from build for communication with relayd
Mathieu Desnoyers [Mon, 5 Aug 2013 19:24:31 +0000 (15:24 -0400)] 
sessiond: use version major/minor from build for communication with relayd

Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agobuild: export major/minor/patchlevel numbers
Mathieu Desnoyers [Mon, 5 Aug 2013 19:23:27 +0000 (15:23 -0400)] 
build: export major/minor/patchlevel numbers

Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Dead code when checking return value from (ust_app|kernel)_snapshot_record
Christian Babeux [Mon, 5 Aug 2013 19:11:30 +0000 (15:11 -0400)] 
Fix: Dead code when checking return value from (ust_app|kernel)_snapshot_record

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTest: enable kernel events after start
Julien Desfossez [Mon, 5 Aug 2013 19:04:04 +0000 (15:04 -0400)] 
Test: enable kernel events after start

This test detects if we actually append new metadata when enabling a
kernel event after a start.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: kernel ctl error codes are based on errno
Mathieu Desnoyers [Mon, 5 Aug 2013 17:46:58 +0000 (13:46 -0400)] 
Fix: kernel ctl error codes are based on errno

ioctl returns -1, and error codes are based on -errno.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: format string mismatch
Mathieu Desnoyers [Sun, 21 Jul 2013 23:58:09 +0000 (19:58 -0400)] 
Fix: format string mismatch

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agotest: test_periodical_metadata_flush shrink timer period, kill app
Mathieu Desnoyers [Sun, 21 Jul 2013 23:22:06 +0000 (19:22 -0400)] 
test: test_periodical_metadata_flush shrink timer period, kill app

Decrease the switch timer period to 100ms (instead of 1s), since we're
only getting 2s worth of app run. If the system is busy, nothing really
guarantee that the timer will indeed fire during this time-frame (so
strictly speaking, this test could still fail).

Also, kill the application before trying to read the trace: this should
ensure that the trace is not appended to concurrently with validation.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: format string type mismatch
Mathieu Desnoyers [Sun, 21 Jul 2013 23:08:06 +0000 (19:08 -0400)] 
Fix: format string type mismatch

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agosnapshot howto: update text
Mathieu Desnoyers [Sun, 21 Jul 2013 18:26:45 +0000 (14:26 -0400)] 
snapshot howto: update text

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd snapshot howto
Mathieu Desnoyers [Sun, 21 Jul 2013 18:23:42 +0000 (14:23 -0400)] 
Add snapshot howto

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 2.3.0-rc2 v2.3.0-rc2
Mathieu Desnoyers [Fri, 19 Jul 2013 22:47:10 +0000 (18:47 -0400)] 
Version 2.3.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd core-handler README to dist tarball
Mathieu Desnoyers [Fri, 19 Jul 2013 22:10:29 +0000 (18:10 -0400)] 
Add core-handler README to dist tarball

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoextras: core-handler: simplify, allow usage from tracing group
Mathieu Desnoyers [Fri, 19 Jul 2013 21:55:00 +0000 (17:55 -0400)] 
extras: core-handler: simplify, allow usage from tracing group

Allow managing the coredump handler tracing session from the tracing
group. Use create --snapshot.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: add missing dot
Mathieu Desnoyers [Fri, 19 Jul 2013 21:05:09 +0000 (17:05 -0400)] 
Cleanup: add missing dot

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: documentation: create name and options
Mathieu Desnoyers [Fri, 19 Jul 2013 20:56:16 +0000 (16:56 -0400)] 
Fix: documentation: create name and options

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd core dump snapshot handler script
Christian Babeux [Fri, 19 Jul 2013 20:12:49 +0000 (16:12 -0400)] 
Add core dump snapshot handler script

This is a custom core dump program that will be called when a core dump
occurs.  The program will save the core data in CORE_PATH and also, if a
root session daemon is running, will record a snapshot of tracing data
using the lttng command line utility.

Refer to README for installation and testing instructions.

Sample output of test script:

Setup...
Spawning a session daemon
Session auto-20130626-224838 created.
Kernel channel chan enabled for session auto-20130626-224838
kernel event sched_switch created in channel chan
Tracing started for session auto-20130626-224838
Sleeping...
Crashing...
./test.sh: line 35: 16980 Segmentation fault      (core dumped)
$(dirname $0)/crash
Waiting for data availability
Tracing stopped for session auto-20130626-224838
Session auto-20130626-224838 destroyed
Core dump and snapshot will be available in /tmp/lttng/{core,snapshot}.

/tmp/lttng
|-- core
|   `-- core.16980
`-- snapshot
    `-- snapshot
        |-- chan_0
        |-- chan_1
        |-- chan_2
        |-- chan_3
        |-- chan_4
        |-- chan_5
        |-- chan_6
        |-- chan_7
        `-- metadata

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: sym name len (kernel)
Mathieu Desnoyers [Fri, 19 Jul 2013 18:43:05 +0000 (14:43 -0400)] 
Fix: sym name len (kernel)

Use kernel and not UST sym name len for kernel tracing. Fixed build when
UST is disabled.

Fix bug introduced in 2.3-rc dev cycle by:

commit 850767541647c102a299d7fbc39c97555ac70224
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date:   Fri Jul 19 09:04:29 2013 -0400

    Fix: (slight UI change) refuse missing -c if non-default channel exists

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: tests: provide channel name when a non-default channel exists: per-pid
Mathieu Desnoyers [Fri, 19 Jul 2013 18:06:14 +0000 (14:06 -0400)] 
Fix: tests: provide channel name when a non-default channel exists: per-pid

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: tests: provide channel name when a non-default channel exists
Mathieu Desnoyers [Fri, 19 Jul 2013 17:59:39 +0000 (13:59 -0400)] 
Fix: tests: provide channel name when a non-default channel exists

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: data pending race
Mathieu Desnoyers [Fri, 19 Jul 2013 17:28:13 +0000 (13:28 -0400)] 
Fix: data pending race

There is a data pending race involving late population of the streams in
the stream hash table, and applying flush on streams that are not yet
globally visible.

This is caused by the fact that streams are added to the hash table only
when received by the data-handling consumer thread.

This results in data_pending() incorrectly returning that there is no
data pending in some cases.

This has been discovered by adding 1s delay in read subbuffer function
for testing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix hang in make check snapshots/test_ust
Julien Desfossez [Fri, 19 Jul 2013 16:36:15 +0000 (12:36 -0400)] 
Fix hang in make check snapshots/test_ust

Missing a kill of the test app at the end of
test_ust_1000_local_snapshots.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: ust-consumer: wrong indentation
Mathieu Desnoyers [Fri, 19 Jul 2013 15:29:14 +0000 (11:29 -0400)] 
Cleanup: ust-consumer: wrong indentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: print dots while waiting for data availability
Mathieu Desnoyers [Fri, 19 Jul 2013 14:36:52 +0000 (10:36 -0400)] 
Fix: print dots while waiting for data availability

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: remove sleep(1) added by "Fix: (slight UI change) refuse missing -c if non-defau...
Mathieu Desnoyers [Fri, 19 Jul 2013 14:04:12 +0000 (10:04 -0400)] 
Fix: remove sleep(1) added by "Fix: (slight UI change) refuse missing -c if non-default channel exists"

For debugging, added by mistake.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: (slight UI change) refuse missing -c if non-default channel exists
Mathieu Desnoyers [Fri, 19 Jul 2013 13:04:29 +0000 (09:04 -0400)] 
Fix: (slight UI change) refuse missing -c if non-default channel exists

After a user creates a channel within a session, creating a "default"
channel if a user forgets to put "-c channel_name" in the following
add-context, enable-event, disable-event commands is misleading.  The
natural expected behavior would be that the command would apply the the
last enabled channel (notion of a "current" channel, like we have for
sessions), but certainly not that it creates a new channel with default
attributes behind the user's back.

An intermediate fix that would not require to keep a notion of current
channel is to refuse creation of a default channel if at least one
non-default channel has already been created in the session.

This commit affects enable-event, disable-event and add-context
commands.

This fix belongs to the 2.3-rc cycle, and cannot be backported, since
it:

a) changes the user interface of lttng (returns an error in the case
   where -c name is missing and the session contains an non-default
   channel)
b) changes the ABI between lttng-ctl and sessiond: a default channel is
   now expressed as an empty string ('\0') rather than by "channel0",
   which allows making the difference between an explicit "channel0"
   channel and a default channel in the session daemon.

Fixes #522

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: push metadata on stop for per-UID buffers
Mathieu Desnoyers [Fri, 19 Jul 2013 12:59:12 +0000 (08:59 -0400)] 
Fix: push metadata on stop for per-UID buffers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoREADME: update python documentation
Mathieu Desnoyers [Thu, 18 Jul 2013 15:17:26 +0000 (11:17 -0400)] 
README: update python documentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.043589 seconds and 4 git commands to generate.