Mathieu Desnoyers [Wed, 3 Jul 2013 22:33:37 +0000 (18:33 -0400)]
Fix: ring buffer: get_subbuf() checks should be performed on "consumed" parameter
This triggers lots of false-positive -EAGAIN errors in flight recorder
snapshots.
Reported-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 1 Jul 2013 22:18:06 +0000 (18:18 -0400)]
Fix: SWITCH_FLUSH new sub-buffer checks
The SWITCH_FLUSH, when performed on a completely empty sub-buffer, was
missing some checks (imported from space reservation).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 1 Jul 2013 21:10:52 +0000 (17:10 -0400)]
Fix: ring buffer: handle concurrent update in nested buffer wrap around check
With stress-test loads that trigger sub-buffer switch very frequently
(small 4kB sub-buffers, frequent flush) in lttng-modules, we currently
observe this kind of warnings once every few minutes:
[65335.896208] ring buffer relay-overwrite-mmap, cpu 5: records were lost. Caused by:
[65335.896208] [ 0 buffer full, 1 nest buffer wrap-around, 0 event too big ]
It appears that the check for nested buffer wrap-around does not take
into account that a concurrent execution contexts (either nested for
per-cpu buffers, or from another CPU or nested for global buffers) can
update the commit_count value concurrently.
What we really want to do with this check is to ensure that if we enter
a sub-buffer that had an unbalanced reserve/commit count, assuming there
is no hope that this gets rebalanced promptly, we detect this and drop
the current event. However, in the case where the commit counter has
been concurrently updated by another reserve or a switch, we want to
retry the entire reserve operation.
One way to detect this is to sample the reserve offset twice, around the
commit counter read, along with the appropriate memory barriers.
Therefore, we can detect if the mismatch between reserve and commit
counter is actually caused by a concurrent update, which necessarily has
updated the reserve counter.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 30 Jun 2013 21:45:32 +0000 (17:45 -0400)]
Fix: handle writes of length 0
lib_ring_buffer_write() could be passed a length of 0. This typically
has no side-effect as far as writing into the buffers is concerned,
except for one detail: in overwrite mode, there is a check to make sure
the sub-buffer can be written into. This check is performed even if
length is 0. In the case where this would fall exactly at the end of a
sub-buffer, the check would fail, because the offset would fall exactly
at the beginning of the next sub-buffer.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 19 Jun 2013 00:34:22 +0000 (20:34 -0400)]
Version 2.1.3
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 18 Jun 2013 14:07:57 +0000 (10:07 -0400)]
Tracepoint.h: replace assertion by fprintf and abort()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 18 Apr 2013 16:21:55 +0000 (12:21 -0400)]
Fix: tracepoint.h incorrect assumption about constructor order
Incorrect assumption about constructor execution order can trigger a
segfault when trying to execute tracepoint_register_lib.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 28 Mar 2013 18:39:24 +0000 (14:39 -0400)]
Fix: tracepoint instrumentation constructor order issue
If the linker decides to run a constructor from a tracepoint probe
before the constructor from the application, a recent modification
(commit
558b9d86247004f8e9bbaf8c982f3b2b182093d1) allowed that the wrong
constructor execution order could prohibit the program's tracepoints
from being registered.
Fix this by making two separate constructors.
Fixes #487
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 26 Mar 2013 11:30:07 +0000 (07:30 -0400)]
Performance: add unlikely to tracepoint dynamic linking test
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 5 Mar 2013 22:04:44 +0000 (17:04 -0500)]
Fix: ensure all probe providers have their symbols
Original commit log from stable-2.2:
Following the removal of metadata generation from UST, the probes cannot
find the tracepoint_dlopen() symbol. Ensure those probes can be built by
declaring this symbol within each probe.
stable-2.1 backport:
Similar issue was experienced with the "demo" test program when built
outside of the UST tree.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 18 Jun 2013 14:02:00 +0000 (10:02 -0400)]
Clarify probe registration documentation/errors
Fixes #513
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 18 Jun 2013 01:00:03 +0000 (21:00 -0400)]
Add mising include in ust.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Yannick Brosseau [Mon, 17 Jun 2013 16:07:11 +0000 (12:07 -0400)]
lttng-gen-tp: Fix include guard name with file using non valid characters
Now, the include guard will be generated with all the non
alpha-numeric characters replace with an '_'
Fixes #511
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 21 May 2013 13:39:41 +0000 (09:39 -0400)]
Fix: missing dependency for liblttng-ust-tracepoint.so
Fixes #538
Reported-by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 8 May 2013 19:56:28 +0000 (15:56 -0400)]
manpage: Document probe provider compatibility
Fixes #502
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 18 Apr 2013 16:24:07 +0000 (12:24 -0400)]
Typo fix in README
Fixes #505
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 18 Apr 2013 16:08:53 +0000 (12:08 -0400)]
Safety-check: only call register_lib if found in liblttng-ust-tracepoint.so.0
If a liblttng-ust-tracepoint.so.0 would happen not to contain the
expected symbols, don't trace (rather than segfault).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 27 Mar 2013 17:30:53 +0000 (13:30 -0400)]
Fix: filter string comparison should check for literal
The prior fix "Fix: filter string wildcard comparison" missed check for
string literal.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 27 Mar 2013 14:50:56 +0000 (10:50 -0400)]
Fix: filter string wildcard comparison
wildcards * should match 0 or more characters (not 1 or more).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 26 Mar 2013 12:18:18 +0000 (08:18 -0400)]
Fix: _LGPL_SOURCE rcu dereference fix
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 25 Mar 2013 18:36:30 +0000 (14:36 -0400)]
Version 2.1.2
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 20 Mar 2013 20:07:07 +0000 (16:07 -0400)]
Fix uninitialized has_loglevel variable
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 20 Mar 2013 18:02:38 +0000 (14:02 -0400)]
tracepoint: Don't add NULL probes
Reported-by: Sahara <keun-o.park@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Jérémie Galarneau [Tue, 19 Mar 2013 20:43:32 +0000 (16:43 -0400)]
Remove mention of locking issues associated with dlopen usage
This notice has been removed from the README as part of revision
b834dead.
Add a warning relating to dlclose() usage detailed in issue 447 in both
the man page and the README file.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 6 Mar 2013 15:07:12 +0000 (10:07 -0500)]
Fix: refcount issue in lttng-ust-abi.c
The following scenario could lead to a segmentation fault in
applications when the sessiond disappears or when the application try to
exit. This is caused by incorrect handling of reference counts.
This can happen in very particular race scenario, described as follows:
1) The sessiond asks for "release" of one or more objects (e.g. a
session object), but _without_ asking for release of _all_ objects
referencing the session.
2) The application exits, thus calling objd_table_destroy(). It walks on
all objects, decrementing their reference count, freeing memory when
their reference count reaches "1".
However, here is the issue: since "release" has already been performed
by sessiond on the session object, this extra reference count unref
performed by objd_table_destroy() can make the session object disappear
while it is still needed by either the channel object or the enabler
object. Therefore, we can experience a segmentation fault when we try to
unref and free the channel or enabler objects within
objd_table_destroy().
Fix this issue by adding the concept of an "owner reference". Only
objd_table_destroy(), lttng_ust_objd_table_owner_cleanup(), "release"
commands, and failure paths of object creation are allowed to decrement
the owner reference. We restrict objd_table_destroy() and
lttng_ust_objd_table_owner_cleanup() to _only_ decrement refcount of
objects _if_ their owner reference is still held.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 27 Feb 2013 21:39:30 +0000 (16:39 -0500)]
Fix: don't flush-final for offset 0 if reader is on sub-buffer
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 26 Feb 2013 20:25:18 +0000 (15:25 -0500)]
Use tp rcu link test in provider
Ensure we never trigger a null pointer exception.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 26 Feb 2013 20:16:57 +0000 (15:16 -0500)]
Remove direct dependency of probes on urcu-bp
The filter feature added a direct dependency of probes providers against
urcu-bp .so, while linking them against liblttng-ust should suffice. Fix
this by using the tracepoint.h wrapper for rcu_dereference().
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 15 Feb 2013 13:19:59 +0000 (08:19 -0500)]
Fix package: don't distribute generated headers
Fixes #421
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 14 Feb 2013 19:46:53 +0000 (14:46 -0500)]
Fix: don't cancel already exited threads
Ensure we don't issue pthread_cancel() on already exited threads.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 12 Feb 2013 19:25:28 +0000 (14:25 -0500)]
Scalability fix: tracepoint.c hash table size increase
Speed up process startup for applications with large number of
tracepoints (e.g. 16k in J9 vm) by increasing the tracepoint.c hash
table size from 64 to 4096.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 12 Feb 2013 19:20:05 +0000 (14:20 -0500)]
Scalability fix for many events: event hash table size
Increase number of buckets for event hash table (per session) from 64 to
4096. This improves process startup time for J9 vm (with 16k
tracepoints) very significantly.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 6 Feb 2013 21:56:16 +0000 (16:56 -0500)]
Speed up probe registration for large amount of events
LTTng-UST probe registration is O(n^2). I actually left a comment that
describes this, also implying that we can improve this if it becomes an
issue.
I've had a report from Yang Wang, who works on instrumenting the J9 VM,
that O(n^2) does not agree well with 16000 probes and tracepoints.
It appears that lttng_probe_register() is being too paranoid for its own
good. There are now many things that are guaranteed by the way probe
providers are being built.
We actually need to keep a check that no provider with the same name has
been registered (O(n) on the number of registered providers, could be
improved with a hash table if it ever becomes necessary).
Use an assert to check that each event name starts with its own provider
name (it would be an internal error within the provider if it's not the
case). (O(n) on the number of events within a provider)
The rest is just useless, so remove this O(n^2) check.
While we are there, remove the now unused
lttng_event_get()/lttng_event_put() functions.
Reported-by: Yang Wang <yangw.wang5@unb.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 31 Jan 2013 19:59:11 +0000 (14:59 -0500)]
Add missing demo-trace shell script to dist tarball
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 25 Jan 2013 15:11:18 +0000 (10:11 -0500)]
Fix: missing test for lttng_ust_comm_should_quit in lttng-ust-comm.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 21 Jan 2013 17:11:12 +0000 (12:11 -0500)]
Documentation: clarify debian package name for uuid in README
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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>
Mathieu Desnoyers [Mon, 21 Jan 2013 16:58:55 +0000 (11:58 -0500)]
Fix: comment in ust-ctl.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 21 Jan 2013 15:56:33 +0000 (10:56 -0500)]
Fix I/O-related error values in ustctl
These internal ustctl API members document >=0 as OK values. Make sure
reply recv errors are returned as errors.
Clarify ustctl_create_stream() error values.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Fri, 18 Jan 2013 19:00:06 +0000 (14:00 -0500)]
Version 2.1.1
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 16 Jan 2013 17:56:09 +0000 (12:56 -0500)]
Introduce hash table for lttng_create_event_if_missing()
lttng_create_event_if_missing() takes a lot of CPU time with stress-test
applications containing 1000 different TRACEPOINT_EVENT() and 1000
individual tracepoint() call-site.
With tracing disabled:
time ./AppWith1000_lines_TP 0
real 0m2.487s
user 0m2.424s
sys 0m0.000s
Introducing this hash table cuts the overhead very significantly when
tracing is enabled:
Before patch:
72.16% AppWith1000_lin liblttng-ust.so.0.0.0 [.] lttng_create_event_if_missing
25.64% AppWith1000_lin AppWith1000_lines_TP [.] a(int)
time ./AppWith1000_lines_TP 0
real 0m7.946s
user 0m7.864s
sys 0m0.000s
After patch:
89.13% AppWith1000_lin AppWith1000_lines_TP [.] a(int)
3.30% AppWith1000_lin liblttng-ust.so.0.0.0 [.] lttng_create_event_if_missing
time ./AppWith1000_lines_TP 0
real 0m2.762s
user 0m2.692s
sys 0m0.004s
Acked-by: David Goulet <dgoulet@efficios.com>
Acked-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Samuel Martin [Sun, 13 Jan 2013 16:40:10 +0000 (11:40 -0500)]
Fix: don't build C++ example if a C++ compiler isn't available
By default lttng-ust builds a hello.cxx C++ example that demonstrates
the usage of the userspace tracing library in a C++ program.
Unfortunately, when no C++ support is available, the build of lttng-ust
fails just because of this example code. So we make the compilation of
this code conditional on whether a working C++ compiler was found.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This page took 0.044611 seconds and 4 git commands to generate.