Fix: Don't assume that PROT_WRITE grants read permissions

The prot flag passed to mmap() is set to PROT_WRITE when the O_RDWR
access flags is used. This assumes that PROT_WRITE grants read
permissions on the mmap'ed region. While this is true on x86, this
causes a segmentation fault on SPARC and, presumably, other
architectures implementing strict access permissions.

CTF Writer needs read permissions since the unaligned integer writes
may use load instructions as the value is read back to perform the
required shifting/masking is performed in the _bt_bitfield_write_*
macros.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: incorrect compiler warning

The compiler does not see that *target will necessarily set the values.
Initialize the variables to 0 to silence uninitialized variable warning.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Merge branch 'master' of git://git.efficios.com/babeltrace
initial import, just copy/rename of lttng-live

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
link babeltrace with lttng-state

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
initial diversion from live

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
basic memcached handling

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
last code with memcached, switching to redis

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
redis rocks

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
sched_process_fork and free with lua scripts

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
handle sched_switch

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
fix sched_switch handling

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
handle sys_open

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
exit_syscall tracks sys_open

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
split exit_syscall handler in functions

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
handle sys_close

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
rebuild state

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
reconstruct fork + latency syscalls

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
use the redis pipeline API, much faster

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
flush at the end also

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>