From: David Goulet Date: Wed, 30 Jan 2013 21:36:23 +0000 (-0500) Subject: Move LTTng-UST buffer ownership from application to consumer X-Git-Tag: v2.2.0-rc1~70 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=ffe600149a7608221985751e1bf293234bf2545c;hp=ffe600149a7608221985751e1bf293234bf2545c;p=lttng-tools.git 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 Signed-off-by: David Goulet ---