Complete change of the source directory tree For the sake of clearness and awesomeness :P, this change was needed for better semantic across the code and better organization of source files. src/ --> Contains source files of the project bin/ --> Contains every binaries this git tree builds (lttng, lttng-sessiond and lttng-consumerd). lib/ --> Contains exported libraries (lttng-ctl). common/ --> Contains shared code for the entire project. (internal libraries mostly) Every internal headers are moved from include/ to src/common. The include directory only contains exported public headers now (lttng/lttng.h). The -I$(top_srcdir)/src is also added for all Makefiles. The consumerd APIs are not exported anymore. The reason is that the consumer will get completely re-engineered in the next months. It's our safety net for the APIs breakage of the coming year concerning the consumerd library. Renaming is done also on some internal libraries to follow the naming convention. The public library liblttngctl is renamed to liblttng-ctl making it linkable now with "-llttng-ctl" deprecating the old "-llttngctl". No code is changed with this commit except #include statements added/removed/renamed. This is why there is yet files and internal API calls that does not follow the naming convention (Ex: lttngerr.h, lttng-share.h in src/common). Signed-off-by: David Goulet <dgoulet@efficios.com>
Add and support the new hash table library liblttng-ht/ is the library introduced for hash table management. This library uses the URCU ht-shrink branch (not yet upstream) making the lib completely lockless. Import git head URCU hashtables at commit: 91a75cc579698814e47877cc8927fcae1f573739 Note that urcu hash table files are copied from the urcu git ree to this git tree waiting for them to be upstream and stable. Old hash table files are removed from libcommon. Signed-off-by: David Goulet <dgoulet@efficios.com>
Create all trace directories and files with client user credentials Keep the client user credentials that created a session along with the session. Use exactly those credentials to chown the created directories and files. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix multi-session UST handling combined with shm fd teardown shm fd is used as unique identifier for the channel when passing the stream fds to the consumer. However, closing the fd reuses the same identifier for the next round, thus getting the same consumer channel/streams as the previous one. This causes multi-session tracing to only work for the first session, not the following ones. So instead of doing a channel lookup on add channel and a stream lookup upon add stream, we "steal" the identifier. We still lookup the channel identifier upon stream add though: this means the sessiond needs to keep the channel shm fd open until it has finished sending all stream fds to the consumer. For kernel consumer, the update operation still does a stream id lookup. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
UST consumer: implement missing ust-specific callbacks + fixes. Also fix consumer handling of poll fd: a mask should be used. Also fix UST stream output passed to the consumer (the fix is a hack currently, left a FIXME). Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>