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>
instrumentation sched: add missing fork pid info

Fixes #434

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: don't flush-final for offset 0 if reader is on sub-buffer

Triggers rare sub-buffer corruption when a buffer is completely full and
a final flush is then performed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix 3.8 kernel support: namespace lttng_is_signed_type()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix Linux 3.8 ext4 probe support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix Linux 3.8 btrfs probe warning

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-module: sched.h: Fix compilation on 3.9 kernel

With commit 8bd75c77b7c6a3954140dd2e20346aef3efe4a35
included in 3.9-rc1 kernel, rt specific bits in "linux/sched.h"
were moved into new header file "linux/sched/rt.h".

Fixes this compilation error:
 CC [M]  /home/majo/lttng/lttng-modules/probes/lttng-probe-sched.o
...
/home/majo/lttng/lttng-modules/probes/../instrumentation/events/lttng-module
/../../../probes/../instrumentation/events/lttng-module/sched.h:
In function '__event_probe__sched_switch':
/home/majo/lttng/lttng-modules/probes/../instrumentation/events/lttng-module
/../../../probes/../instrumentation/events/lttng-module/sched.h:164:1:
error: 'MAX_RT_PRIO' undeclared (first use in this function)
...

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Introduce API to remap event names exposed by LTTng

Some kernel event providers don't follow naming hierarchy. Rename them
internally within LTTng.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Rename odd event names

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
workqueue instrumentation: remove duplicated structures

Don't replicate internal structures from the kernel: this is asking for
serious trouble, and could lead to breakage if building on newer kernels
that have modified structures.

The proper approach, if we really need to extract this information,
would be to add APIs to the Linux kernel workqueue that allow getting
this information.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rcu: update to 3.9 rc kernel instrumentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
block: update instrumentation to 3.9 rc kernel

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
writeback instrumentation: remove duplicated structures

Don't replicate internal structures from the kernel: this is asking for
serious trouble, and could lead to breakage if building on newer kernels
that have modified structures.

The proper approach, if we really need to extract this information,
would be to add APIs to the Linux kernel workqueue that allow getting
this information.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: vmscan instrumentation build

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Update README

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Version 2.2.0-rc1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Clean up using global_dirty_limit wrapper for writeback probe

Move the wrapper around reading of global_dirty_limit to /wrapper/
directory.  Introduce a new kallsyms_lookup_dataptr function for
obtaining the address unchanged and use it in global_dirty_limit
wrapper.  Since the data address is available only if
CONFIG_KALLSYMS_ALL is set, omit the whole probe from building if this
config is missing.

[ Edit by Mathieu Desnoyers: small coding style fixes ]

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>