lttng-ust.git
11 years agoDocument dependency on libuuid
Mathieu Desnoyers [Thu, 20 Dec 2012 19:01:33 +0000 (14:01 -0500)] 
Document dependency on libuuid

Fixes #418

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 2.1.0 v2.1.0
Mathieu Desnoyers [Thu, 20 Dec 2012 18:24:28 +0000 (13:24 -0500)] 
Version 2.1.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoBump liblttng-ust-ctl lib version major number
Mathieu Desnoyers [Thu, 20 Dec 2012 17:32:15 +0000 (12:32 -0500)] 
Bump liblttng-ust-ctl lib version major number

This internal library between ust and tools has had its ABI changed
between 2.0 and 2.1.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoBump UST proto version minor number
Mathieu Desnoyers [Thu, 20 Dec 2012 15:44:05 +0000 (10:44 -0500)] 
Bump UST proto version minor number

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoHelper to debug: add object name
Mathieu Desnoyers [Thu, 20 Dec 2012 00:33:44 +0000 (19:33 -0500)] 
Helper to debug: add object name

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTests: Fix rundir not created in ust-basic-tracing
Christian Babeux [Wed, 19 Dec 2012 19:41:43 +0000 (14:41 -0500)] 
Tests: Fix rundir not created in ust-basic-tracing

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoust test: add missing return -1
Mathieu Desnoyers [Wed, 19 Dec 2012 19:39:00 +0000 (14:39 -0500)] 
ust test: add missing return -1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTest: update ust tracing unit tests to 2.1 internal ABI
Mathieu Desnoyers [Wed, 19 Dec 2012 19:37:14 +0000 (14:37 -0500)] 
Test: update ust tracing unit tests to 2.1 internal ABI

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTests: Fix rundir not created in ust-multi-test
Christian Babeux [Wed, 19 Dec 2012 19:22:27 +0000 (14:22 -0500)] 
Tests: Fix rundir not created in ust-multi-test

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdapt internal files and examples to TRACEPOINT_INCLUDE
Mathieu Desnoyers [Mon, 17 Dec 2012 20:50:31 +0000 (15:50 -0500)] 
Adapt internal files and examples to TRACEPOINT_INCLUDE

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdapt tests to TRACEPOINT_INCLUDE
Mathieu Desnoyers [Mon, 17 Dec 2012 20:46:11 +0000 (15:46 -0500)] 
Adapt tests to TRACEPOINT_INCLUDE

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: tests remove hello.cxx/ust_tests_demo.h
Mathieu Desnoyers [Mon, 17 Dec 2012 20:43:22 +0000 (15:43 -0500)] 
Cleanup: tests remove hello.cxx/ust_tests_demo.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: don't do macro expansion in tracepoint file name
Mathieu Desnoyers [Mon, 17 Dec 2012 20:36:08 +0000 (15:36 -0500)] 
Fix: don't do macro expansion in tracepoint file name

Change the API in a backward compatible way: previously, probe headers
would do e.g.

but e.g. "linux" here would be expanded to "1", which is bad.

Fix this by allowing those headers to do:

instead. We still support the old TRACEPOINT_INCLUDE_FILE for backward
compatibility.

Reported-by: Sébastien Barthélémy <barthelemy@crans.org>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix lttng-gen-tp: Template file must end in .tp
Christian Babeux [Fri, 14 Dec 2012 01:36:32 +0000 (20:36 -0500)] 
Fix lttng-gen-tp: Template file must end in .tp

Fixes #297

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoPack structures in comm protocol between UST and sessiond
Mathieu Desnoyers [Thu, 13 Dec 2012 22:01:05 +0000 (17:01 -0500)] 
Pack structures in comm protocol between UST and sessiond

Ensure robustness with respect to 32-bit vs 64-bit apps vs sessiond.

Since we are updating the ABI, change the order of overwrite field in
channel and channel attributes, to remove some unneeded padding.

This breaks compatibility between sessiond 2.1 and ust 2.0 (and
vice-versa), but sessiond refuses applications with version number that
does not match.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup lttng-gen-tp: Help not showing when using -h,--help
Christian Babeux [Thu, 13 Dec 2012 21:06:12 +0000 (16:06 -0500)] 
Cleanup lttng-gen-tp: Help not showing when using -h,--help

Fixes #299

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup lttng-gen-tp: remove leading underscore before include guard
Mathieu Desnoyers [Thu, 13 Dec 2012 20:05:26 +0000 (15:05 -0500)] 
Cleanup lttng-gen-tp: remove leading underscore before include guard

Fixes #298

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agofix memleak: ustctl free shadow chan on ustctl_unmap_channel()
Mathieu Desnoyers [Mon, 10 Dec 2012 20:33:05 +0000 (15:33 -0500)] 
fix memleak: ustctl free shadow chan on ustctl_unmap_channel()

Also on error path within map channel.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate license text
Mathieu Desnoyers [Wed, 5 Dec 2012 13:11:32 +0000 (08:11 -0500)] 
Update license text

- Add LICENSE file
- all public headers are now under MIT license,
- add missing text from MIT license into each file using this license.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: check if event enabled for bytecode-less events
Mathieu Desnoyers [Tue, 4 Dec 2012 12:30:04 +0000 (07:30 -0500)] 
Fix: check if event enabled for bytecode-less events

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: handle enablers without bytecode
Mathieu Desnoyers [Mon, 3 Dec 2012 15:11:24 +0000 (10:11 -0500)] 
Fix: handle enablers without bytecode

to reproduce issue with the upstream "hello" program:

lttng create
lttng enable-event -u -a --filter 'intfield==42'
lttng enable-event -u -a
lttng start

./hello
lttng stop
lttng view

only shows event with 42 intfield. We expect all events.

Fixes #406

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoPrint probe provider mismatch error even without -Wsystem-headers
Mathieu Desnoyers [Mon, 26 Nov 2012 20:14:24 +0000 (15:14 -0500)] 
Print probe provider mismatch error even without -Wsystem-headers

Suggested-by: David OShea <David.OShea@quantum.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofilter: Add missing padding
Mathieu Desnoyers [Thu, 22 Nov 2012 19:41:13 +0000 (14:41 -0500)] 
filter: Add missing padding

This will make future extensions to filter much easier.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoVersion 2.1.0-rc2 v2.1.0-rc2
Mathieu Desnoyers [Thu, 22 Nov 2012 19:03:53 +0000 (14:03 -0500)] 
Version 2.1.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofilter interpreter cleanup: use uint64_t for retval
Mathieu Desnoyers [Thu, 22 Nov 2012 18:50:34 +0000 (13:50 -0500)] 
filter interpreter cleanup: use uint64_t for retval

Reported-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: filter linking can dereference NULL pointer on alloc failure
Mathieu Desnoyers [Thu, 22 Nov 2012 17:28:49 +0000 (12:28 -0500)] 
Fix: filter linking can dereference NULL pointer on alloc failure

Reported-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup: remove whitespaces and EOL in tests
Mathieu Desnoyers [Thu, 22 Nov 2012 16:05:13 +0000 (11:05 -0500)] 
Cleanup: remove whitespaces and EOL in tests

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: use only single lower bit of filter return value
Mathieu Desnoyers [Tue, 20 Nov 2012 21:21:18 +0000 (16:21 -0500)] 
Filter: use only single lower bit of filter return value

Implementation change: use a uint64_t as filter return value, and test
with a mask for this bit. This reserves other bits for future use.

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: filter: var len array at end of external structure
Mathieu Desnoyers [Fri, 16 Nov 2012 22:20:09 +0000 (17:20 -0500)] 
Fix: filter: var len array at end of external structure

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: filter link fail handling
Mathieu Desnoyers [Fri, 16 Nov 2012 20:53:09 +0000 (15:53 -0500)] 
Fix: filter link fail handling

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: add missing seqnum field to filter
Mathieu Desnoyers [Fri, 16 Nov 2012 20:26:10 +0000 (15:26 -0500)] 
Fix: add missing seqnum field to filter

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofilters: perform union rather than intersection
Mathieu Desnoyers [Fri, 16 Nov 2012 16:17:21 +0000 (11:17 -0500)] 
filters: perform union rather than intersection

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoImplement support for overlapping wildcard/events
Mathieu Desnoyers [Fri, 16 Nov 2012 15:19:32 +0000 (10:19 -0500)] 
Implement support for overlapping wildcard/events

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup: add lttng_/lttng-/LTTNG_ prefixes
Mathieu Desnoyers [Mon, 12 Nov 2012 21:40:06 +0000 (16:40 -0500)] 
Cleanup: add lttng_/lttng-/LTTNG_ prefixes

ltt_event -> lttng_event mass rename
Rename ltt_chan -> lttng_chan
Rename ltt_session -> lttng_session
Rename enum abstract_types to enum lttng_abstract_types
Rename ltt_transport to lttng_transport
Rename rest of ltt_ prefixes to lttng_
Complete file and symbol renames from LTT/ltt to LTTNG/lttng
Finish ltt->lttng symbol conversion

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofilter: add seqnum field to filter command
Mathieu Desnoyers [Mon, 12 Nov 2012 21:14:20 +0000 (16:14 -0500)] 
filter: add seqnum field to filter command

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter iteration: iterate on list of filters
Mathieu Desnoyers [Mon, 12 Nov 2012 20:55:27 +0000 (15:55 -0500)] 
Filter iteration: iterate on list of filters

Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agodocument that tracepoint names should ideally not be re-used
Mathieu Desnoyers [Tue, 20 Nov 2012 16:38:21 +0000 (11:38 -0500)] 
document that tracepoint names should ideally not be re-used

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRemove LIBFORMAT config declaration, unused
Mathieu Desnoyers [Mon, 12 Nov 2012 20:40:15 +0000 (15:40 -0500)] 
Remove LIBFORMAT config declaration, unused

Remove leftover from UST 0.x. Not needed anymore.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd libc errno translation layer to UST error code
David Goulet [Fri, 9 Nov 2012 18:20:46 +0000 (13:20 -0500)] 
Add libc errno translation layer to UST error code

Also add four new possible code being EEXIST, EINVAL, ENOSYS and EPERM.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRevert "Fix: configure.ac should use "--target", not "--host""
Mathieu Desnoyers [Wed, 7 Nov 2012 20:23:56 +0000 (15:23 -0500)] 
Revert "Fix: configure.ac should use "--target", not "--host""

This reverts commit 98c8a1d90d1052980365353eef201124863128b0.

No. --target is for building cross-compilers. --host was  appropriate.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: configure.ac should use "--target", not "--host"
Mathieu Desnoyers [Wed, 7 Nov 2012 20:08:33 +0000 (15:08 -0500)] 
Fix: configure.ac should use "--target", not "--host"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: add const qualifier for filter local void *
Mathieu Desnoyers [Wed, 7 Nov 2012 20:08:02 +0000 (15:08 -0500)] 
Fix: add const qualifier for filter local void *

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: re-allow non-lvalue string, sequence, array parameters
Mathieu Desnoyers [Wed, 7 Nov 2012 18:24:58 +0000 (13:24 -0500)] 
Fix: re-allow non-lvalue string, sequence, array parameters

Issue introduced by upstream commit:

  commit 27f4b6094f399f2fe231b58801dce98cbd21baa9
  Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  Date: Tue Sep 4 12:17:07 2012 -0400

  Fix filter: pointer to string, not string, should be on stack

  Fixes #329

Reported-by: David Bryant <david.bryant@quantum.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoTear down handles associated with a closed sessiond socket
Mathieu Desnoyers [Tue, 6 Nov 2012 21:39:52 +0000 (16:39 -0500)] 
Tear down handles associated with a closed sessiond socket

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoDistinguish UST return codes from transport return codes
Mathieu Desnoyers [Tue, 6 Nov 2012 18:40:47 +0000 (13:40 -0500)] 
Distinguish UST return codes from transport return codes

One API change visible from lttng-tools: -ENOENT return values for
tracepoint list and tracepoint field list are now -LTTNG_UST_ERR_NOENT.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Conditionally disable tests requiring shared libs support
Mathieu Desnoyers [Mon, 5 Nov 2012 15:36:14 +0000 (10:36 -0500)] 
Fix: Conditionally disable tests requiring shared libs support

When building lttng-ust with shared library support explicitly
disabled (e.g.: ./configure --disable-shared), libtool fail with
a fatal error:

  CC       tp.lo
  CC       tp2.lo
  CCLD     liblttng-ust-provider-ust-tests-demo.la
libtool: link: can not build a shared library
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

The build should not fail because some tests require explicit shared
library support, instead they should be skipped.

This patch detect that the --disable-shared flag was passed to the
configure script and toggle the "NO_SHARED" Automake variable.
Thus, the tests that require explicit shared library support can
be skipped when the NO_SHARED variable is true.

[ Edit by Mathieu Desnoyers: add "" in configure.ac to follow the local
  coding style. ]

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup: don't spawn per-user thread if HOME is not set
Mathieu Desnoyers [Tue, 30 Oct 2012 01:39:42 +0000 (21:39 -0400)] 
Cleanup: don't spawn per-user thread if HOME is not set

Reported-by: David OShea <David.OShea@quantum.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoManpage: document supported UST contexts
Mathieu Desnoyers [Wed, 24 Oct 2012 13:04:32 +0000 (09:04 -0400)] 
Manpage: document supported UST contexts

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: procname context semantic
Mathieu Desnoyers [Wed, 24 Oct 2012 13:04:14 +0000 (09:04 -0400)] 
Fix: procname context semantic

Cache the procname per-thread rather than per-process to take into
account that prctl() can be used to set thread names.

prctl() should be issued before tracing each thread's first event if we
care about the thread name.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Fix self-assign warning on struct ustfork_clone_info init
Christian Babeux [Tue, 23 Oct 2012 19:57:55 +0000 (15:57 -0400)] 
Fix: Fix self-assign warning on struct ustfork_clone_info init

Use the proper field designator syntax (C99) to initialize the
ustfork_clone_info struct.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: memcpy of string is larger than source
Mathieu Desnoyers [Tue, 9 Oct 2012 16:47:31 +0000 (12:47 -0400)] 
Fix: memcpy of string is larger than source

Hollis Blanchard <hollis_blanchard@mentor.com> wrote:
> I seem to have hit a little problem with a "hello world" test app and
> lttng-ust 2.0.3. lttng-ust.git seems to be affected as well. Basically,
> I created a single UST tracepoint, but as soon as I run "lttng
> enable-event -u -a", my app segfaults. The problem seems to be that when
> creating the event to pass to ltt_event_create(), we try to memcpy the
> full 256 bytes of name. However, the name might be shorter, and if we
> get unlucky it falls within 256 bytes of the segment boundary...

Fixing the 3 sites where this issue arise. Manually inspecting all
memcpy in the UST code returned by grep did the job.

Reported-by: Hollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoImplement liblttng-ust-fork daemon() override test
Mathieu Desnoyers [Fri, 5 Oct 2012 13:46:54 +0000 (09:46 -0400)] 
Implement liblttng-ust-fork daemon() override test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoliblttng-ust-fork: override daemon() call
Mathieu Desnoyers [Fri, 5 Oct 2012 13:44:37 +0000 (09:44 -0400)] 
liblttng-ust-fork: override daemon() call

Fixes #252

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoustfork: set errno to ENOSYS if symbol lookup fails
Mathieu Desnoyers [Fri, 5 Oct 2012 13:29:32 +0000 (09:29 -0400)] 
ustfork: set errno to ENOSYS if symbol lookup fails

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: be quiet on filter linker error
Mathieu Desnoyers [Wed, 3 Oct 2012 14:48:05 +0000 (10:48 -0400)] 
Fix: be quiet on filter linker error

Could be reproduced by starting the application before enabling the
event with filter.

Fixes #362

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoBuild out of src tree
Paul Chavent [Tue, 2 Oct 2012 16:37:30 +0000 (12:37 -0400)] 
Build out of src tree

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: filter bytecode specializer stack leak
Mathieu Desnoyers [Mon, 1 Oct 2012 22:17:58 +0000 (18:17 -0400)] 
Fix: filter bytecode specializer stack leak

Fixes #356

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: reloc offset validation error out on filters with no reloc table
Christian Babeux [Sat, 29 Sep 2012 17:37:40 +0000 (13:37 -0400)] 
Fix: reloc offset validation error out on filters with no reloc table

The reloc table is currently appended at the end of the bytecode data.
With this scheme, the reloc table offset will be equal to the length
of the bytecode data.

<- length ->
+----------+-------------+
| BYTECODE | RELOC TABLE |
+----------+-------------+
           |
           +--> Reloc table offset

A special case arise with filters with no reloc table.

Example:

Filter: "myString" == "yourString"
./filter-grammar-test -p -B -i -b < bogus
<root>
        <op type="==">
                <expression>
                        <string value="myString"/>
                </expression>
                <expression>
                        <string value="yourString"/>
                </expression>
        </op>
</root>
Generating IR... done
Validating IR... done
Generating bytecode... done
Size of bytecode generated: 24 bytes.
Bytecode:

Val. Operator
---- --------
0x40 (FILTER_OP_LOAD_STRING)
0x6D m
0x79 y
0x53 S
0x74 t
0x72 r
0x69 i
0x6E n
0x67 g
0x00 \0
0x40 (FILTER_OP_LOAD_STRING)
0x79 y
0x6F o
0x75 u
0x72 r
0x53 S
0x74 t
0x72 r
0x69 i
0x6E n
0x67 g
0x00 \0
0x0C (FILTER_OP_EQ)
0x01 (FILTER_OP_RETURN)

Reloc table (offset: 24):
Empty

<-   24   ->
+----------+
| BYTECODE | <- No reloc table
+----------+
           |
           +--> Reloc table offset

In this case, we see that the reloc table offset (24) is indeed equal to
the length of the bytecode (24), but the reloc table is _empty_. Thus,
the reloc_offset received in handle_message() will be equal to the
data_size and will be wrongly flagged as not within the data even thought
the filter is entirely valid.

The fix is to simply allow a reloc_offset to be equal to the data_size.

Fixes #342

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoPerform calculation on bit size in 64-bit
Mathieu Desnoyers [Fri, 28 Sep 2012 00:23:46 +0000 (20:23 -0400)] 
Perform calculation on bit size in 64-bit

allow 32-bit architectures to have sub-buffers larger than 256MB.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUse uint64_t for packet header content size and packet size
Mathieu Desnoyers [Thu, 27 Sep 2012 23:59:43 +0000 (19:59 -0400)] 
Use uint64_t for packet header content size and packet size

Allow packets larger than 256MB (4GB / 8 bits per byte).

Fixes #353

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: manpage typo "-lllttng-ust" -> "-llttng-ust"
Mathieu Desnoyers [Wed, 26 Sep 2012 14:21:47 +0000 (10:21 -0400)] 
Fix: manpage typo "-lllttng-ust" -> "-llttng-ust"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: BSD getprogname null pointer dereference
Mathieu Desnoyers [Wed, 26 Sep 2012 02:50:39 +0000 (22:50 -0400)] 
Fix: BSD getprogname null pointer dereference

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd support for model.emf.uri event info
Mathieu Desnoyers [Thu, 20 Sep 2012 16:39:47 +0000 (12:39 -0400)] 
Add support for model.emf.uri event info

Declared with:

TRACEPOINT_MODEL_EMF_URI(provider, event, "string")

this info is optional, can be added in the tracepoint probe.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter error message cleanup
Mathieu Desnoyers [Wed, 19 Sep 2012 18:00:41 +0000 (14:00 -0400)] 
Filter error message cleanup

When encountering an invalid opcode, don't print that an overflow has
occurred.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoManpage update: document use in daemons
Mathieu Desnoyers [Wed, 19 Sep 2012 14:25:27 +0000 (10:25 -0400)] 
Manpage update: document use in daemons

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: get_wait_shm() ust mutex deadlock (add 2 missing exit calls)
Mathieu Desnoyers [Tue, 18 Sep 2012 04:52:10 +0000 (00:52 -0400)] 
Fix: get_wait_shm() ust mutex deadlock (add 2 missing exit calls)

Reported-by: changz <zheng.chang@emc.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: get_wait_shm() ust mutex deadlock
Mathieu Desnoyers [Mon, 17 Sep 2012 16:01:14 +0000 (12:01 -0400)] 
Fix: get_wait_shm() ust mutex deadlock

The main issue is that get_wait_shm() bypass the fork() wrapper (with
lttng_ust_nest_count), which is responsible for holding the UST mutex
across fork(). Therefore, when exiting the context of the child process,
we execute the destructor, which try to grab the UST mutex, which might
be in pretty much any state.

Given that we don't want this process to try to register to
lttng-sessiond (because this is internal to lttng-ust), we might want to
let it skip the destructor execution. This would actually be the easiest
way out.

Reported-by: changz <zheng.chang@emc.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: add events with 0 field to field list
Mathieu Desnoyers [Mon, 17 Sep 2012 14:11:09 +0000 (10:11 -0400)] 
Fix: add events with 0 field to field list

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.1.0-rc1 v2.1.0-rc1
Mathieu Desnoyers [Mon, 10 Sep 2012 21:13:56 +0000 (17:13 -0400)] 
Update version to 2.1.0-rc1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix make dist: fix liblttng-ust-java dependencies
Mathieu Desnoyers [Mon, 10 Sep 2012 21:09:20 +0000 (17:09 -0400)] 
Fix make dist: fix liblttng-ust-java dependencies

Acked-by: Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix make dist: add missing filter header
Mathieu Desnoyers [Mon, 10 Sep 2012 20:34:18 +0000 (16:34 -0400)] 
Fix make dist: add missing filter header

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: backward compatibility with UST 2.0 app probes
Mathieu Desnoyers [Fri, 7 Sep 2012 19:19:45 +0000 (15:19 -0400)] 
Fix: backward compatibility with UST 2.0 app probes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Filter ABI changes to support FILTER_BYTECODE_MAX_LEN (65536)
Christian Babeux [Thu, 6 Sep 2012 21:05:01 +0000 (17:05 -0400)] 
Fix: Filter ABI changes to support FILTER_BYTECODE_MAX_LEN (65536)

In order to support the filter bytecode maximum length (65536 bytes),
the lttng_ust_filter_bytecode len field type must be able to
hold more than a uint16_t. Change the field type to a uint32_t.

Also, since the relocation table is located at the end of the actual
bytecode, the reloc_table_offset (reloc_offset in ust-abi) field must
support offset values larger than 65535. Change the field type to a
uint32_t. This change will allow support of relocation table appended
to larger bytecode without breaking the ABI if the need arise in the
future.

Both changes currently breaks the filter ABI, but this should be a
reasonable compromise since the filtering feature has not been
released yet.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoExport "written" information about fields
Mathieu Desnoyers [Tue, 4 Sep 2012 16:51:43 +0000 (12:51 -0400)] 
Export "written" information about fields

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix filter: pointer to string, not string, should be on stack
Mathieu Desnoyers [Tue, 4 Sep 2012 16:17:07 +0000 (12:17 -0400)] 
Fix filter: pointer to string, not string, should be on stack

Fixes #329

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: tracepoint float nowrite
Mathieu Desnoyers [Fri, 31 Aug 2012 13:34:48 +0000 (06:34 -0700)] 
Fix: tracepoint float nowrite

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: accept 65536 bytes long bytecodes
Mathieu Desnoyers [Mon, 27 Aug 2012 19:17:47 +0000 (15:17 -0400)] 
Fix: accept 65536 bytes long bytecodes

We were limited to 65535.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd hostname to env
Mathieu Desnoyers [Mon, 27 Aug 2012 00:36:47 +0000 (20:36 -0400)] 
Add hostname to env

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoABI change: bump internal version to 3.0.0
Mathieu Desnoyers [Fri, 17 Aug 2012 19:26:59 +0000 (15:26 -0400)] 
ABI change: bump internal version to 3.0.0

We keep compatiblity with applications (so we're still in the 2.x
versions), but we are breaking compatibility with lttng-consumerd.
Therefore, push the internal version number to 3.0.0.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: threads should be created in DETACHED state
Michael Greene [Thu, 16 Aug 2012 20:42:02 +0000 (16:42 -0400)] 
Fix: threads should be created in DETACHED state

Signed-off-by: Michael Greene <michael.greene@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: 32-bit x86 strict-aliasing warnings
Mathieu Desnoyers [Thu, 16 Aug 2012 19:57:05 +0000 (15:57 -0400)] 
Fix: 32-bit x86 strict-aliasing warnings

Compiling on x86-32 shows the following warnings for filter (with gcc
4.3 and 4.4):

././ust_tests_hello.h:28: note: initialized from here
././ust_tests_hello.h:28: error: dereferencing pointer ‘__stack_data.18’ does break strict-aliasing rules

Fix it by using memcpy when copying to the temporary "stack" array used
to send arguments to the filter.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix UST SIGPIPE handling
Mathieu Desnoyers [Tue, 14 Aug 2012 21:10:59 +0000 (17:10 -0400)] 
Fix UST SIGPIPE handling

When the consumerd dies (from a SIGKILL), it may close all of its file
descriptors rather abruptly.

We ensured that the UST command threads have all signals blocked, and
they use MSG_NOSIGNAL when sending messages to the sessiond over
sockets.

However, the consumer scheme uses a pipe(2) to transport the "wakeup"
info from the application tracing site to the consumer daemon. It may
send a SIGPIPE to the application in that case, which could kill the
application, an unwanted side-effect.

Block thread SIGPIPE around write() and wait for the signal to fix this.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Christian Babeux <christian.babeux@efficios.com>
CC: David Goulet <dgoulet@efficios.com>
12 years agoFix: Libtool fails to find dependent libraries when cross-compiling lttng-ust
Christian Babeux [Thu, 2 Aug 2012 22:55:11 +0000 (18:55 -0400)] 
Fix: Libtool fails to find dependent libraries when cross-compiling lttng-ust

This problem arise when cross compiling and linking libraries with
indirect libraries dependencies (such as liblttng-ust). This "bug" is
caused by an upstream modification in the libtool package on Debian
system. The libtool "link_all_deplibs" flag is set to "no" by default
on linux targets (AFAIK, other distros set it to "unknown").

The chosen solution is to detect such cases via the configure script
and automagically patch the libtool.m4 by forcing the "link_all_deplibs"
to "unknown".

This fixup can be disabled with the appropriate configure flag:

./configure --disable-libtool-linkdep-fixup

Sample configure output on affected systems:

checking for occurence(s) of link_all_deplibs = no in
         ./config/libtool.m4... 3
configure: WARNING: the detected libtool will not link all
           dependencies, forcing link_all_deplibs = unknown

Fixes: #321
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup: filter: turn bytecode linking error msg into debug
Mathieu Desnoyers [Tue, 24 Jul 2012 18:33:12 +0000 (14:33 -0400)] 
Cleanup: filter: turn bytecode linking error msg into debug

This can be triggered by enable event on a wildcard, with some of the
events that do not contain the requested fields.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoMake lttng-ust robust against -finstrument-functions.
Paul Woegerer [Wed, 18 Jul 2012 19:28:44 +0000 (15:28 -0400)] 
Make lttng-ust robust against -finstrument-functions.

[ Edit by Mathieu Desnoyers:

We need to declare the no_instrument_function attribute on function
declarations (rather than definition) for g++. Moved the attribute prior
to the function declaration (rather than after) to follow the coding
style within LTTng-UST. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: keep aliased ax and bx registers
Mathieu Desnoyers [Tue, 17 Jul 2012 20:09:02 +0000 (16:09 -0400)] 
Filter: keep aliased ax and bx registers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: remove interpreter dynamic typing
Mathieu Desnoyers [Tue, 17 Jul 2012 19:14:33 +0000 (15:14 -0400)] 
Filter: remove interpreter dynamic typing

Now all performed by instruction selection.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: add missing specialized op names
Mathieu Desnoyers [Tue, 17 Jul 2012 19:10:51 +0000 (15:10 -0400)] 
Filter: add missing specialized op names

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: specialize double-s64 binary comparators
Mathieu Desnoyers [Tue, 17 Jul 2012 19:07:43 +0000 (15:07 -0400)] 
Filter: specialize double-s64 binary comparators

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix filter: fix stack leak on taken branch
Mathieu Desnoyers [Tue, 17 Jul 2012 18:22:49 +0000 (14:22 -0400)] 
Fix filter: fix stack leak on taken branch

Also fix return op stack check in validation.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: Implement stack-based interpreter
Mathieu Desnoyers [Mon, 16 Jul 2012 21:56:31 +0000 (17:56 -0400)] 
Filter: Implement stack-based interpreter

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: double comparator produces s64
Mathieu Desnoyers [Mon, 16 Jul 2012 19:57:38 +0000 (15:57 -0400)] 
Filter: double comparator produces s64

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: use hash table to check merge points
Mathieu Desnoyers [Mon, 16 Jul 2012 19:46:57 +0000 (15:46 -0400)] 
Filter: use hash table to check merge points

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: split passes into separate components
Mathieu Desnoyers [Mon, 16 Jul 2012 16:31:44 +0000 (12:31 -0400)] 
Filter: split passes into separate components

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: cleanup macros
Mathieu Desnoyers [Mon, 16 Jul 2012 15:18:14 +0000 (11:18 -0400)] 
Filter: cleanup macros

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: validate range overflow with end of insn
Mathieu Desnoyers [Mon, 16 Jul 2012 15:15:02 +0000 (11:15 -0400)] 
Filter: validate range overflow with end of insn

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: validate that field ref strings are non-NULL
Mathieu Desnoyers [Mon, 16 Jul 2012 14:39:19 +0000 (10:39 -0400)] 
Filter: validate that field ref strings are non-NULL

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: ensure logical operator merge is always s64
Mathieu Desnoyers [Sat, 14 Jul 2012 03:25:20 +0000 (23:25 -0400)] 
Filter: ensure logical operator merge is always s64

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: we don't care if double/s64 are literals
Mathieu Desnoyers [Fri, 13 Jul 2012 23:05:09 +0000 (19:05 -0400)] 
Filter: we don't care if double/s64 are literals

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFilter: specialize 'and' and 'or' ops.
Mathieu Desnoyers [Fri, 13 Jul 2012 23:00:15 +0000 (19:00 -0400)] 
Filter: specialize 'and' and 'or' ops.

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