Move LTTng-UST buffer ownership from application to consumer
authorDavid Goulet <dgoulet@efficios.com>
Wed, 30 Jan 2013 21:36:23 +0000 (16:36 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 18 Feb 2013 18:48:44 +0000 (13:48 -0500)
commitffe600149a7608221985751e1bf293234bf2545c
tree521bd57639a54076467cb0620104146c8b5a1f82
parentccf7af6c78ba7a206baa9d0b9578468a1af734e1
Move LTTng-UST buffer ownership from application to consumer

Before this change, applications were performing allocation and teardown
of their buffers. Applications therefore had ownership of the buffers.
The shm and wait fd were passed from applications, though sessiond, to
consumerd through unix sockets.

This change moves ownership of buffers from applications to consumer.
This will allow sharing buffers across many processes in a near future.
It will also facilitate implementation of periodical timers on the
consumer side, now that it has ownership of channels and buffers (also
called streams). This imply that file descriptors on shm and wakeup end
of the pipe are now passed from the consumerd to sessiond, then to
applications, through unix sockets. Then, applications "map" channel and
streams into their own memory space. Channel control structure is
actually a copy for each application, while streams are a shared memory
map (shm) between consumerd and all applications that write into it, and
have a wake up file descriptor on the application side.

Dependency on libuuid has been added to lttng-tools, since the UUID is
needed at channel and buffer allocation.

Note that this is only for UST so the kernel buffers are still created
in the session daemon then passed to the consumer. There is basically no
change for the kernel other than adapting to the new communication data
structure.

This commit needs to be used along with commit named "Move LTTng-UST
buffer ownership from application to consumer" in lttng-ust.

Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
32 files changed:
configure.ac
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/cmd.h
src/bin/lttng-sessiond/consumer.c
src/bin/lttng-sessiond/consumer.h
src/bin/lttng-sessiond/kernel-consumer.c
src/bin/lttng-sessiond/kernel-consumer.h
src/bin/lttng-sessiond/lttng-ust-abi.h
src/bin/lttng-sessiond/lttng-ust-ctl.h
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/trace-kernel.c
src/bin/lttng-sessiond/trace-kernel.h
src/bin/lttng-sessiond/trace-ust.h
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-app.h
src/bin/lttng-sessiond/ust-consumer.c
src/bin/lttng-sessiond/ust-consumer.h
src/common/Makefile.am
src/common/compat/Makefile.am
src/common/compat/tid.h [new file with mode: 0644]
src/common/compat/uuid.h [new file with mode: 0644]
src/common/consumer.c
src/common/consumer.h
src/common/defaults.h
src/common/error.h
src/common/kernel-consumer/kernel-consumer.c
src/common/kernel-consumer/kernel-consumer.h
src/common/relayd/relayd.c
src/common/sessiond-comm/sessiond-comm.h
src/common/ust-consumer/ust-consumer.c
src/common/ust-consumer/ust-consumer.h
tests/tools/streaming/runall
This page took 0.029549 seconds and 4 git commands to generate.