lttng-modules.git
10 years agoVersion 2.0.8 stable-2.0 v2.0.8
Mathieu Desnoyers [Thu, 11 Jul 2013 20:26:34 +0000 (16:26 -0400)] 
Version 2.0.8

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: ring buffer: get_subbuf() checks should be performed on "consumed" parameter
Mathieu Desnoyers [Wed, 3 Jul 2013 22:35:10 +0000 (18:35 -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>
10 years agoFix: SWITCH_FLUSH new sub-buffer checks
Mathieu Desnoyers [Mon, 1 Jul 2013 22:10:22 +0000 (18:10 -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>
10 years agoFix: ring buffer: handle concurrent update in nested buffer wrap around check
Mathieu Desnoyers [Mon, 1 Jul 2013 21:01:56 +0000 (17:01 -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), 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>
10 years agoFix: handle writes of length 0
Mathieu Desnoyers [Sun, 30 Jun 2013 21:38:50 +0000 (17:38 -0400)] 
Fix: handle writes of length 0

lib_ring_buffer_write(), lib_ring_buffer_memset() and
lib_ring_buffer_copy_from_user_inatomic() 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.

It triggers this warning:

[65356.890016] ------------[ cut here ]------------
[65356.890016] WARNING: at /home/compudj/git/lttng-modules/wrapper/ringbuffer/../../lib/ringbuffer/../../wrapper/ringbuffer/../../lib/ringbuffer/backend.h:110 lttng_event_write+0x118/0x140 [lttng_ring_buffer_client_mmap_overwrite]()
[65356.890016] Hardware name: X7DAL
[65356.890016] Modules linked in: lttng_probe_writeback(O) lttng_probe_workqueue(O) lttng_probe_vmscan(O) lttng_probe_udp(O) lttng_probe_timer(O) lttng_probe_sunrpc(O) lttng_probe_statedump(O) lttng_probe_sock(O) lttng_probe_skb(O) lttng_probe_signal(O) lttng_probe_scsi(O) lttng_probe_sched(O) lttng_probe_rcu(O) lttng_probe_random(O) lttng_probe_printk(O) lttng_probe_power(O) lttng_probe_net(O) lttng_probe_napi(O) lttng_probe_module(O) lttng_probe_kvm(O) lttng_probe_kmem(O) lttng_probe_jbd2(O) lttng_probe_jbd(O) lttng_probe_irq(O) lttng_probe_ext4(O) lttng_probe_ext3(O) lttng_probe_compaction(O) lttng_probe_btrfs(O) lttng_probe_block(O) lttng_types(O) lttng_ring_buffer_metadata_mmap_client(O) lttng_ring_buffer_client_mmap_overwrite(O) lttng_ring_buffer_client_mmap_discard(O) lttng_ring_buffer_metadata_client(O) lttng_ring_buffer_client_overwrite(O) lttng_ring_buffer_client_discard(O) lttng_tracer(O) lttng_kretprobes(O) lttng_ftrace(O) lttng_kprobes(O) lttng_statedump(O) lttng_lib_ring_buffer(O) cpufreq_ondemand loop e1000e kvm_intel kvm ptp pps_core [last unloaded: lttng_lib_ring_buffer]
[65357.287529] Pid: 0, comm: swapper/7 Tainted: G           O 3.9.4-trace-test #143
[65357.309694] Call Trace:
[65357.317022]  <IRQ>  [<ffffffff8103a3ef>] warn_slowpath_common+0x7f/0xc0
[65357.336893]  [<ffffffff8103a44a>] warn_slowpath_null+0x1a/0x20
[65357.354368]  [<ffffffffa0ff17b8>] lttng_event_write+0x118/0x140 [lttng_ring_buffer_client_mmap_overwrite]
[65357.383025]  [<ffffffffa100134f>] __event_probe__block_rq_with_error+0x1bf/0x220 [lttng_probe_block]
[65357.410376]  [<ffffffff812ea134>] blk_update_request+0x324/0x720
[65357.428364]  [<ffffffff812ea561>] blk_update_bidi_request+0x31/0x90
[65357.447136]  [<ffffffff812eb68c>] blk_end_bidi_request+0x2c/0x80
[65357.465127]  [<ffffffff812eb6f0>] blk_end_request+0x10/0x20
[65357.481822]  [<ffffffff81406b7c>] scsi_io_completion+0x9c/0x670
[65357.499555]  [<ffffffff813fe320>] scsi_finish_command+0xb0/0xe0
[65357.517283]  [<ffffffff81406965>] scsi_softirq_done+0xa5/0x140
[65357.534758]  [<ffffffff812f1d30>] blk_done_softirq+0x80/0xa0
[65357.551710]  [<ffffffff81043b00>] __do_softirq+0xe0/0x440
[65357.567881]  [<ffffffff81043ffe>] irq_exit+0x9e/0xb0
[65357.582754]  [<ffffffff81026465>] smp_call_function_single_interrupt+0x35/0x40
[65357.604388]  [<ffffffff8167be2f>] call_function_single_interrupt+0x6f/0x80
[65357.624976]  <EOI>  [<ffffffff8100ac06>] ? default_idle+0x46/0x300
[65357.643541]  [<ffffffff8100ac04>] ? default_idle+0x44/0x300
[65357.660235]  [<ffffffff8100b899>] cpu_idle+0x89/0xe0
[65357.675109]  [<ffffffff81664911>] start_secondary+0x220/0x227

Always from an event that can write a 0-length field as last field of
its payload, and it always happen directly on a sub-buffer boundary.

While we are there, check for length 0 in lib_ring_buffer_read_cstr()
too.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: ring buffer: RING_BUFFER_FLUSH ioctl buffer corruption
Mathieu Desnoyers [Sun, 30 Jun 2013 19:37:46 +0000 (15:37 -0400)] 
Fix: ring buffer: RING_BUFFER_FLUSH ioctl buffer corruption

lib_ring_buffer_switch_slow() clearly states:

 * Note, however, that as a v_cmpxchg is used for some atomic
 * operations, this function must be called from the CPU which owns the
 * buffer for a ACTIVE flush.

But unfortunately, the RING_BUFFER_FLUSH ioctl does not follow these
important directives. Therefore, whenever the consumer daemon or session
daemon explicitly triggers a "flush" on a buffer, it can race with data
being written to the buffer, leading to corruption of the reserve/commit
counters, and therefore corruption of data in the buffer. It triggers
these warnings for overwrite mode buffers:

[65356.890016] WARNING: at
/home/compudj/git/lttng-modules/wrapper/ringbuffer/../../lib/ringbuffer/../../wrapper/ringbuffer/../../lib/ringbuffer/backend.h:110 lttng_event_write+0x118/0x140 [lttng_ring_buffer_client_mmap_overwrite]()

Which indicates that we are trying to write into a sub-buffer for which
we don't have exclusive access. It also causes the following warnings to
show up:

[65335.896208] ring buffer relay-overwrite-mmap, cpu 5: records were lost. Caused by:
[65335.896208]   [ 0 buffer full, 80910 nest buffer wrap-around, 0 event too big ]

Which is caused by corrupted commit counter.

Fix this by sending an IPI to the CPU owning the flushed buffer for
per-cpu synchronization. For global synchronization, no IPI is needed,
since we allow writes from remote CPUs.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoVersion 2.0.7 v2.0.7
Mathieu Desnoyers [Wed, 19 Jun 2013 00:44:45 +0000 (20:44 -0400)] 
Version 2.0.7

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix build and load against linux-2.6.33.x
Samuel Martin [Mon, 17 Jun 2013 14:28:51 +0000 (10:28 -0400)] 
Fix build and load against linux-2.6.33.x

* lttng-event.h declared but did not implement
  lttng_add_perf_counter_to_ctx on kernel >=2.6.33, the implementation
  was in lttng-context-perf-counters.c, which was only included for
  kernel >=2.6.34.  This prevented the module from being loaded.

* on kernel 2.6.33.x, lttng-context-perf-counters.c complains about
  implicit declaration for {get,put}_online_cpus and
  {,un}register_cpu_notifier; so fix header inclusion.

Signed-off-by: Samuel Martin <smartin@aldebaran-robotics.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix check in lttng_strlen_user_inatomic
Simon Marchi [Wed, 6 Feb 2013 16:26:59 +0000 (11:26 -0500)] 
Fix check in lttng_strlen_user_inatomic

__copy_from_user_inatomic returns the number of bytes that could not be
copied, not an error code. This fixes the test accordingly.

[ Edit by Mathieu Desnoyers: change "ret" type to unsigned long too. ]

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: statedump hang/too early completion due to logic error
Mathieu Desnoyers [Wed, 9 Jan 2013 17:40:55 +0000 (12:40 -0500)] 
Fix: statedump hang/too early completion due to logic error

The previous "Fix: statedump hang due to incorrect wait/wakeup use" was
not actually fixing the real problem.

The issue is that we should pass the expected condition to wait_event()
rather than its contrary.

This bug has been sitting there for a while. I suspect that a recent
change in the Linux scheduler behavior for newly spawned worker threads
might have contributed to trigger the hang more reliably.

The effects of this bugs are:
- possible hang of the lttng-sessiond (within the kernel) at tracing
  start,
- the statedump end event is traced before all worker threads have
  actually completed, which can confuse LTTng viewer state systems.

Reported-by: Phil Wilshire <sysdcs@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: statedump hang due to incorrect wait/wakeup use
Mathieu Desnoyers [Tue, 8 Jan 2013 19:27:05 +0000 (14:27 -0500)] 
Fix: statedump hang due to incorrect wait/wakeup use

Reported-by: Phil Wilshire <sysdcs@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 2.0.6 v2.0.6
Mathieu Desnoyers [Fri, 7 Dec 2012 19:32:14 +0000 (14:32 -0500)] 
Update version to 2.0.6

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agolib/ringbuffer/frontend_api.h: Include linux/prefetch.h.
Will Newton [Thu, 11 Oct 2012 16:51:15 +0000 (12:51 -0400)] 
lib/ringbuffer/frontend_api.h: Include linux/prefetch.h.

prefetch() is used in this file so make sure we include the appropriate
header before using it.

Signed-off-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix warning with 3.6.0 kernel
Mathieu Desnoyers [Wed, 3 Oct 2012 13:11:00 +0000 (09:11 -0400)] 
Fix warning with 3.6.0 kernel

No actual runtime impact, but neater anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: compat layer only on supported architectures
Julien Desfossez [Fri, 21 Sep 2012 02:10:50 +0000 (22:10 -0400)] 
Fix: compat layer only on supported architectures

The compat_ulong_t type is only defined on some architectures, so we
need to protect the compat defines with the ifdef CONFIG_COMPAT.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix ring buffer 32/64 bits compat
Julien Desfossez [Thu, 20 Sep 2012 16:00:05 +0000 (12:00 -0400)] 
Fix ring buffer 32/64 bits compat

The type of fields exchanged between kernel and userspace must be
compat_ulong_t instead of unsigned long in case of compat where
userspace is 32 bits and kernel is 64 bits.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix cleanup: move lttng-tracer-core.h include to lib ringbuffer config.h
Mathieu Desnoyers [Thu, 20 Sep 2012 14:20:38 +0000 (10:20 -0400)] 
Fix cleanup: move lttng-tracer-core.h include to lib ringbuffer config.h

This is where it is used. Add a #ifdef check for the LTTNG_TRACER_CORE_H
define to ensure that the header it depends on is always included.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix ring_buffer_frontend.c: missing include lttng-tracer-core.h
Wade Farnsworth [Thu, 20 Sep 2012 13:52:22 +0000 (09:52 -0400)] 
Fix ring_buffer_frontend.c: missing include lttng-tracer-core.h

In lib/ringbuffer/ring_buffer_frontend.c, RING_BUFFER_ALIGN is undefined,
leading to no alignment offset being recorded after the call to
config->cb.record_header_size() in lib_ring_buffer_try_reserve_slow().

However, lttng-ring-buffer-client.h does define RING_BUFFER_ALIGN, so
the alignment offset will be produced when the packet header is written
in lttng_write_event_header().

This discrepancy may be observed on architectures that don't set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, such as ARM, with a babeltrace
error such as:

babeltrace: ../../include/babeltrace/ctf/types.h:206: ctf_pos_get_event:
Assertion `pos->offset <= pos->content_size' failed.
Aborted

indicating that the actual content size differs from the calculated one
due to the difference in alignment.  Including the appropriate header
file in ring_buffer_frontend.c solves the problem.

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agofix timestamps on architectures without CONFIG_KTIME_SCALAR
Mathieu Desnoyers [Thu, 6 Sep 2012 14:26:38 +0000 (10:26 -0400)] 
fix timestamps on architectures without CONFIG_KTIME_SCALAR

trace_clock_monotonic_wrapper() should return a u64 representing the
number of nanoseconds since system startup.
ktime_get() provides that value directly within its .tv64 field only
on those architectures defining CONFIG_KTIME_SCALAR, whereas in all
other cases (e.g. PowerPC) a ktime_to_ns() conversion (which
translates back to .tv64 when CONFIG_KTIME_SCALAR is defined)
becomes necessary.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 2.0.5 v2.0.5
Mathieu Desnoyers [Mon, 27 Aug 2012 12:29:15 +0000 (08:29 -0400)] 
Update version to 2.0.5

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: statedump: disable vm maps enumeration
Mathieu Desnoyers [Wed, 22 Aug 2012 21:09:20 +0000 (17:09 -0400)] 
Fix: statedump: disable vm maps enumeration

We need the tasklist lock to correctly dump these, which is unavailable
to modules. Disable this feature for now.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: ensure userspace accesses are done with _inatomic
Mathieu Desnoyers [Wed, 22 Aug 2012 20:30:20 +0000 (16:30 -0400)] 
Fix: ensure userspace accesses are done with _inatomic

Otherwise, triggers scheduling while atomic (might_sleep()) warnings,
since we call those from a tracepoint probe (with preemption disabled).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: vppid context should test for current nsproxy
Mathieu Desnoyers [Wed, 22 Aug 2012 19:09:05 +0000 (15:09 -0400)] 
Fix: vppid context should test for current nsproxy

Triggers a NULL pointer exception with tracing scheduling events with
vppid context activated.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "trace event: introduce TP_MODULE_NOAUTOLOAD and TP_MODULE_NOINIT"
Mathieu Desnoyers [Mon, 2 Jul 2012 15:40:44 +0000 (11:40 -0400)] 
Revert "trace event: introduce TP_MODULE_NOAUTOLOAD and TP_MODULE_NOINIT"

This reverts commit e4bd62774b66eea5fd4221f2c006586e911a8de4.

This commit belongs to master, not stable-2.0.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agotrace event: introduce TP_MODULE_NOAUTOLOAD and TP_MODULE_NOINIT
Mathieu Desnoyers [Mon, 2 Jul 2012 15:34:30 +0000 (11:34 -0400)] 
trace event: introduce TP_MODULE_NOAUTOLOAD and TP_MODULE_NOINIT

In preparation for introducing uevent tracing. (user-space events)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 2.0.4 v2.0.4
Mathieu Desnoyers [Wed, 27 Jun 2012 06:48:18 +0000 (08:48 +0200)] 
Update version to 2.0.4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoLTTng: probe-statedump: add #include <linux/sched.h>
UCHINO Satoshi [Wed, 27 Jun 2012 05:44:29 +0000 (07:44 +0200)] 
LTTng: probe-statedump: add #include <linux/sched.h>

This fixes the following build error on ARM;

  CC [M]  drivers/staging/lttng/probes/lttng-probe-statedump.o
In file included from drivers/staging/lttng/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:221:0,
                 from drivers/staging/lttng/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:117,
                 from drivers/staging/lttng/probes/../instrumentation/events/lttng-module/lttng-statedump.h:162,
                 from drivers/staging/lttng/probes/lttng-probe-statedump.c:41:
drivers/staging/lttng/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/lttng-statedump.h:29:1: error: 'TASK_COMM_LEN' undeclared here (not in a function)

Signed-off-by: UCHINO Satoshi <satoshi.uchino@toshiba.co.jp>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agofix: signal_generate event should print utf8 for comm field
Mathieu Desnoyers [Tue, 12 Jun 2012 22:33:33 +0000 (18:33 -0400)] 
fix: signal_generate event should print utf8 for comm field

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 2.0.3 v2.0.3
Mathieu Desnoyers [Fri, 1 Jun 2012 18:49:19 +0000 (14:49 -0400)] 
Update version to 2.0.3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: free_event_id check should compare unsigned int with -1U
Mathieu Desnoyers [Tue, 8 May 2012 20:02:41 +0000 (16:02 -0400)] 
Fix: free_event_id check should compare unsigned int with -1U

Otherwise, on 32-bit:

lttng-modules/lttng-events.c:295: warning: comparison is always false due
to limited range of data type

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: update signal instrumentation for 3.4 kernel
Mathieu Desnoyers [Thu, 26 Apr 2012 21:40:31 +0000 (17:40 -0400)] 
Fix: update signal instrumentation for 3.4 kernel

Fix #226

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.2 v2.0.2
Mathieu Desnoyers [Wed, 18 Apr 2012 20:26:32 +0000 (16:26 -0400)] 
Update version to 2.0.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: generate header missing echo -e for escape chars
Mathieu Desnoyers [Tue, 17 Apr 2012 14:50:12 +0000 (10:50 -0400)] 
Fix: generate header missing echo -e for escape chars

"why is the -e needed ? What was the experienced oddness ?"

   The \n wasn't getting evaluated to a newline and was being inserted
into the header file as '\n'

   From man echo(1):

       If -e is in effect, the following sequences are recognized:

       \\     backslash

       \a     alert (BEL)

       \b     backspace

       \c     produce no further output

       \e     escape

       \f     form feed

       \n     new line

       \r     carriage return

       \t     horizontal tab

       \v     vertical tab

Suggested-by: Ryan Kyser <Ryan.Kyser@jci.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: add missing uaccess.h include (for ARM)
Mathieu Desnoyers [Tue, 17 Apr 2012 14:49:07 +0000 (10:49 -0400)] 
Fix: add missing uaccess.h include (for ARM)

"What required uaccess.h ?"

   I was getting the following error:
   syscalls_pointers_override.h:6:1: error: implicit declaration of function ?strlen_user?

   I found that strlen_user was defined in asm/uaccess.h, which is
included by linux/uaccess.h.

Suggested-by: Ryan Kyser <Ryan.Kyser@jci.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoREADME: Document that CONFIG_MODULES is required
Mathieu Desnoyers [Wed, 11 Apr 2012 00:36:17 +0000 (20:36 -0400)] 
README: Document that CONFIG_MODULES is required

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: README typo
Mathieu Desnoyers [Mon, 9 Apr 2012 19:40:14 +0000 (15:40 -0400)] 
Fix: README typo

Reported-by: Ryan Kyser <Ryan.Kyser@jci.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: document required and optional kernel config options in README
Mathieu Desnoyers [Fri, 6 Apr 2012 16:32:22 +0000 (12:32 -0400)] 
Fix: document required and optional kernel config options in README

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.1 v2.0.1
Mathieu Desnoyers [Thu, 29 Mar 2012 04:41:11 +0000 (00:41 -0400)] 
Update version to 2.0.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: is_compat_task !CONFIG_COMPAT compile error on kernels >= 3.3
Mathieu Desnoyers [Mon, 26 Mar 2012 15:09:30 +0000 (11:09 -0400)] 
Fix: is_compat_task !CONFIG_COMPAT compile error on kernels >= 3.3

The Linux kernel already defines a is_compat_task()   (0) when
!CONFIG_COMPAT since kernel 3.3, so if we see it is already defined,
don't redefine it.

Closes #195

Reported-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.0 stable v2.0.0
Mathieu Desnoyers [Tue, 20 Mar 2012 22:34:27 +0000 (18:34 -0400)] 
Update version to 2.0.0 stable

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.0-rc4 v2.0.0-rc4
Mathieu Desnoyers [Tue, 20 Mar 2012 21:11:02 +0000 (17:11 -0400)] 
Update version to 2.0.0-rc4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate README and add version name place-holder
Mathieu Desnoyers [Tue, 20 Mar 2012 21:09:38 +0000 (17:09 -0400)] 
Update README and add version name place-holder

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.0-rc3
Mathieu Desnoyers [Fri, 16 Mar 2012 19:44:38 +0000 (15:44 -0400)] 
Update version to 2.0.0-rc3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix clock offset 32-bit multiplication overflow
Mathieu Desnoyers [Tue, 13 Mar 2012 20:11:37 +0000 (16:11 -0400)] 
Fix clock offset 32-bit multiplication overflow

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix : wrong assign of fd in state dump
Julien Desfossez [Mon, 12 Mar 2012 19:00:37 +0000 (15:00 -0400)] 
Fix : wrong assign of fd in state dump

lttng_statedump_file_descriptor was using the tgid instead of the fd for
the fd field.

Reported-by: Mathieu Bain <mathieu.bain@polymtl.ca>
Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoLicense cleanup, ifdef namespace cleanup
Mathieu Desnoyers [Fri, 9 Mar 2012 00:28:14 +0000 (19:28 -0500)] 
License cleanup, ifdef namespace cleanup

- Spell out the LGPL license completely in each file.
- Change LINUX_* ifdefs for LIB_* in lib/ringbuffer header.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: ensure power of 2 check handles 64-bit size_t entirely
Mathieu Desnoyers [Thu, 8 Mar 2012 16:00:30 +0000 (11:00 -0500)] 
Fix: ensure power of 2 check handles 64-bit size_t entirely

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 2.0.0-rc2 v2.0.0-rc2
Mathieu Desnoyers [Fri, 2 Mar 2012 22:51:06 +0000 (17:51 -0500)] 
Update version to 2.0.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: dmesg printout should not print metadata warnings
Mathieu Desnoyers [Fri, 2 Mar 2012 15:23:39 +0000 (10:23 -0500)] 
Fix: dmesg printout should not print metadata warnings

Metadata channel retry when an event is dropped by the underlying
buffer. We should not print a message showing that the event has been
dropped to the user on dmesg console.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: use transport name as channel name
Mathieu Desnoyers [Fri, 2 Mar 2012 15:12:42 +0000 (10:12 -0500)] 
Fix: use transport name as channel name

Clarify dmesg printout.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Return -EINVAL instead of print warning if non power of 2 size/num_subbuf
Mathieu Desnoyers [Wed, 22 Feb 2012 00:20:13 +0000 (19:20 -0500)] 
Fix: Return -EINVAL instead of print warning if non power of 2 size/num_subbuf

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate Version to 2.0.0-rc1 v2.0.0-rc1
Mathieu Desnoyers [Mon, 20 Feb 2012 20:32:01 +0000 (15:32 -0500)] 
Update Version to 2.0.0-rc1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoStandardize version across toolchain
Mathieu Desnoyers [Mon, 20 Feb 2012 19:59:42 +0000 (14:59 -0500)] 
Standardize version across toolchain

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agostatedump: Use old macro name for kernel 2.6.38
Juha Niskanen [Thu, 16 Feb 2012 16:55:42 +0000 (11:55 -0500)] 
statedump: Use old macro name for kernel 2.6.38

Signed-off-by: Juha Niskanen <juniskane@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate ChangeLog to 2.0-pre15 v2.0-pre15
Mathieu Desnoyers [Thu, 16 Feb 2012 16:39:57 +0000 (11:39 -0500)] 
Update ChangeLog to 2.0-pre15

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd timer instrumentation
Mathieu Desnoyers [Thu, 16 Feb 2012 16:00:43 +0000 (11:00 -0500)] 
Add timer instrumentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix: need to undef mainline define
Mathieu Desnoyers [Thu, 16 Feb 2012 15:56:11 +0000 (10:56 -0500)] 
fix: need to undef mainline define

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix: Include signal.h instead of irq.h for prototype match check
Mathieu Desnoyers [Thu, 16 Feb 2012 15:54:41 +0000 (10:54 -0500)] 
fix: Include signal.h instead of irq.h for prototype match check

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd signal instrumentation
Mathieu Desnoyers [Thu, 16 Feb 2012 15:46:32 +0000 (10:46 -0500)] 
Add signal instrumentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate ChangeLog to 2.0-pre14 v2.0-pre14
Mathieu Desnoyers [Thu, 16 Feb 2012 14:36:02 +0000 (09:36 -0500)] 
Update ChangeLog to 2.0-pre14

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agosyscall tracing: sys_getcpu
Mathieu Desnoyers [Thu, 16 Feb 2012 03:13:43 +0000 (22:13 -0500)] 
syscall tracing: sys_getcpu

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd sys_clone x86 instrumentation
Mathieu Desnoyers [Thu, 16 Feb 2012 02:48:30 +0000 (21:48 -0500)] 
Add sys_clone x86 instrumentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agostatedump: fix include circular dep
Mathieu Desnoyers [Thu, 16 Feb 2012 02:13:32 +0000 (21:13 -0500)] 
statedump: fix include circular dep

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoImplement state dump
Mathieu Desnoyers [Thu, 16 Feb 2012 02:02:00 +0000 (21:02 -0500)] 
Implement state dump

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate Changelog to 2.0-pre13 v2.0-pre13
Mathieu Desnoyers [Fri, 10 Feb 2012 00:36:51 +0000 (19:36 -0500)] 
Update Changelog to 2.0-pre13

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate README
Mathieu Desnoyers [Wed, 8 Feb 2012 14:37:11 +0000 (09:37 -0500)] 
Update README

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoenvironment: write sysname, release, version, domain to metadata
Mathieu Desnoyers [Tue, 7 Feb 2012 04:29:20 +0000 (23:29 -0500)] 
environment: write sysname, release, version, domain to metadata

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAllow open /proc/lttng for read & write
Mathieu Desnoyers [Tue, 7 Feb 2012 04:23:38 +0000 (23:23 -0500)] 
Allow open /proc/lttng for read & write

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate Changelog to 2.0-pre12 v2.0-pre12
Mathieu Desnoyers [Fri, 3 Feb 2012 03:29:39 +0000 (22:29 -0500)] 
Update Changelog to 2.0-pre12

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd x86 32/64 execve syscall instrumentation override
Mathieu Desnoyers [Thu, 2 Feb 2012 19:42:37 +0000 (14:42 -0500)] 
Add x86 32/64 execve syscall instrumentation override

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRemove unused defines
Mathieu Desnoyers [Thu, 2 Feb 2012 17:21:53 +0000 (12:21 -0500)] 
Remove unused defines

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd padding to ABI
Mathieu Desnoyers [Thu, 2 Feb 2012 17:12:17 +0000 (12:12 -0500)] 
Add padding to ABI

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUse LTTNG_KERNEL_SYM_NAME_LEN
Mathieu Desnoyers [Thu, 2 Feb 2012 17:03:21 +0000 (12:03 -0500)] 
Use LTTNG_KERNEL_SYM_NAME_LEN

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 1.9.9
Mathieu Desnoyers [Thu, 2 Feb 2012 16:55:18 +0000 (11:55 -0500)] 
Update version to 1.9.9

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd missing double-quotes to clock uuid
Mathieu Desnoyers [Mon, 30 Jan 2012 16:27:58 +0000 (11:27 -0500)] 
Add missing double-quotes to clock uuid

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoclock: read bootid as clock monotonic ID
Mathieu Desnoyers [Mon, 30 Jan 2012 15:30:05 +0000 (10:30 -0500)] 
clock: read bootid as clock monotonic ID

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix comment
Mathieu Desnoyers [Mon, 30 Jan 2012 14:19:23 +0000 (09:19 -0500)] 
Fix comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup comment
Mathieu Desnoyers [Mon, 30 Jan 2012 14:03:58 +0000 (09:03 -0500)] 
Cleanup comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoclock: output clock description in metadata
Mathieu Desnoyers [Fri, 27 Jan 2012 02:36:06 +0000 (21:36 -0500)] 
clock: output clock description in metadata

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoProperly fix the timekeeping overflow detection
Mathieu Desnoyers [Thu, 26 Jan 2012 20:13:55 +0000 (15:13 -0500)] 
Properly fix the timekeeping overflow detection

The underlying issue was a mismatch between the ring buffer
configuration description of the number of clock bits (32) saved and the
actual number used (27).

Introduce LTTNG_COMPACT_EVENT_BITS and LTTNG_COMPACT_TSC_BITS across the
code to remove all hardcoded instances of these values to ensure this
kind of mistake does not happen again.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reported-by: Sébastien Barthélémy <barthelemy@crans.org>
12 years agoFix init bug
Mathieu Desnoyers [Sun, 22 Jan 2012 21:22:24 +0000 (16:22 -0500)] 
Fix init bug

Fix reversed logic bug introduced by commit
80996790fa42072d6525f2adb9a910312077bef6

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agorename lib-ring-buffer to lttng-lib-ring-buffer
Mathieu Desnoyers [Sun, 22 Jan 2012 21:18:29 +0000 (16:18 -0500)] 
rename lib-ring-buffer to lttng-lib-ring-buffer

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRemove #warning
Mathieu Desnoyers [Sun, 22 Jan 2012 21:17:27 +0000 (16:17 -0500)] 
Remove #warning

Keep a comment about future work, but don't generate compiler warnings.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoMass rename: ltt_*/ltt-* to LTTNG_*/LTTNG-*
Mathieu Desnoyers [Sun, 22 Jan 2012 21:13:41 +0000 (16:13 -0500)] 
Mass rename: ltt_*/ltt-* to LTTNG_*/LTTNG-*

For files, defines and symbols.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate TODO
Mathieu Desnoyers [Sun, 22 Jan 2012 20:53:11 +0000 (15:53 -0500)] 
Update TODO

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate TODO
Mathieu Desnoyers [Sun, 22 Jan 2012 20:52:05 +0000 (15:52 -0500)] 
Update TODO

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRemove debugfs file (keep only proc file)
Mathieu Desnoyers [Sun, 22 Jan 2012 20:51:41 +0000 (15:51 -0500)] 
Remove debugfs file (keep only proc file)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRename lttng-debugfs-abi files to lttng-abi
Mathieu Desnoyers [Sun, 22 Jan 2012 20:47:17 +0000 (15:47 -0500)] 
Rename lttng-debugfs-abi files to lttng-abi

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate ChangeLog for 2.0-pre11 v2.0-pre11
Mathieu Desnoyers [Tue, 13 Dec 2011 21:57:37 +0000 (16:57 -0500)] 
Update ChangeLog for 2.0-pre11

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix OOPS caused by reference of config pointer
Mathieu Desnoyers [Tue, 13 Dec 2011 21:37:51 +0000 (16:37 -0500)] 
Fix OOPS caused by reference of config pointer

The config pointer points to data that may vanish across the life-time
of the ring buffer stream references. It's only kept valid for the
duration between the channel create and destroy, but the streams can
keep an extra reference on the channel, and thus need the config to stay
valid.

Perform a copy of the config rather than keeping a pointer to it.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoGather detailed info from x86 64 32-bit compat syscall instrumentation
Mathieu Desnoyers [Fri, 9 Dec 2011 14:39:10 +0000 (09:39 -0500)] 
Gather detailed info from x86 64 32-bit compat syscall instrumentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolttng lib: ring buffer move null pointer check to open
Mathieu Desnoyers [Fri, 9 Dec 2011 14:26:52 +0000 (09:26 -0500)] 
lttng lib: ring buffer move null pointer check to open

Let's move the NULL buf check to the file "open", where it belongs.  The
"open" file operation is the actual interface between lib ring buffer
and the modules using it.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolttng lib: ring buffer remove duplicate null pointer
Mathieu Desnoyers [Fri, 9 Dec 2011 14:26:06 +0000 (09:26 -0500)] 
lttng lib: ring buffer remove duplicate null pointer

This check is performed at mapping setup time in
lib_ring_buffer_mmap_buf() already, so we can safely remove this
duplicata.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolttng lib: ring buffer: remove stale null-pointer
Mathieu Desnoyers [Fri, 9 Dec 2011 14:25:18 +0000 (09:25 -0500)] 
lttng lib: ring buffer: remove stale null-pointer

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolttng wrapper: add missing include to kallsyms wrapper
Mathieu Desnoyers [Fri, 9 Dec 2011 14:24:26 +0000 (09:24 -0500)] 
lttng wrapper: add missing include to kallsyms wrapper

Needed to keep bissectability.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolttng: cleanup one-bit signed bitfields
Mathieu Desnoyers [Fri, 9 Dec 2011 14:22:30 +0000 (09:22 -0500)] 
lttng: cleanup one-bit signed bitfields

* Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Sparse complains that these signed bitfields look "dubious".  The
> problem is that instead of being either 0 or 1 like people would expect,
> signed one bit variables like this are either 0 or -1.  It doesn't cause
> a problem in this case but it's ugly so lets fix them.

* walter harms (wharms@bfs.de) wrote:
> hi,
> This patch looks ok to me but this design is ugly by itself.
> It should be replaced by an uchar uint whatever or use a
> real bool (obviously not preferred by this programmes).

bool :1, uchar :1 or uint :1 could make sense. uchar:1/bool:1 won't save
any space here, because the surrounding fields are either uint or
pointers, so alignment will just add padding.

I try to use int/uint whenever possible because x86 CPUs tend to get
less register false-dependencies when using instructions modifying the
whole register (generated by using int/uint types) rather than only part
of it (uchar/char/bool). I only use char/uchar/bool when there is a
clear wanted space gain.

The reason why I never use the bool type within a structure when I want
a compact representation is that bool takes a whole byte just to
represent one bit:

struct usebitfield {
int a;
unsigned int f:1, g:1, h:1, i:1, j:1;
int b;
};

struct usebool {
int a;
bool f, g, h, i, j;
int b;
};

struct useboolbf {
int a;
bool f:1, g:1, h:1, i:1, j:1;
int b;
};

int main()
{
printf("bitfield %d bytes, bool %d bytes, boolbitfield %d bytes\n",
sizeof(struct usebitfield), sizeof(struct usebool),
sizeof(struct useboolbf));
}

result:

bitfield 12 bytes, bool 16 bytes, boolbitfield 12 bytes

This is because each bool takes one byte, while the bitfields are put in
units of "unsigned int" (or bool for the 3rd struct). So in this
example, we need 5 bytes + 3 bytes alignment for the bool, but only 4
bytes to hold the "unsigned int" unit for the bitfields.

The choice between bool and bitfields must also take into account the
frequency of access to the variable, because bitfields require mask
operations to access the selected bit(s). You will notice that none of
these bitfields are accessed on the tracing fast-path: only in
slow-paths. Therefore, space gain is more important than speed here.

One might argue that I have so few of these fields here that it does not
make an actual difference to go for bitfield or bool. I am just trying
to choose types best suited for their intended purpose, ensuring they
are future-proof and will allow simply adding more fields using the same
type, as needed.

So I guess I'll go for unsigned int :1 (rather than uint:1, so we
keep source-level compatibility with user-space LTTng-UST).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd TODO file
Mathieu Desnoyers [Fri, 9 Dec 2011 14:15:49 +0000 (09:15 -0500)] 
Add TODO file

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate symbol name length max size to 256
Mathieu Desnoyers [Tue, 6 Dec 2011 01:03:24 +0000 (20:03 -0500)] 
Update symbol name length max size to 256

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix last modifications to string_from_user operations
Yannick Brosseau [Sat, 3 Dec 2011 02:03:19 +0000 (21:03 -0500)] 
Fix last modifications to string_from_user operations

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoDocument that depmod needs to be executed by hand
Mathieu Desnoyers [Sat, 19 Nov 2011 20:17:52 +0000 (15:17 -0500)] 
Document that depmod needs to be executed by hand

External modules don't seem to actually execute depmod on make install,
even though the console output says so. Document that it needs to be
manually executed in the README file.

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