ltt-sessiond: use short options for modprobe in order to support Busybox Many embedded systems are based on Busybox, and therefore use the Busybox implementation of modprobe. This implementation does not support long options such as --remove and --quiet, only short options such as -r and -q are supported. This patches changes ltt-sessiond to use the short options, which are more widely available, and allows lttng to work easily on a Busybox-based system. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Preliminary work for full UST support Add hashtable support for all UST data structure. At this point, enable channel and event works with the global UST domain. The interaction with the ust consumer has problems for now thus not working at this stage. NOTICE: This commit does NOT work with the user space tracer yet. Please refer to next commit for working version. Signed-off-by: David Goulet <david.goulet@polymtl.ca>
UST 2.0 support Refactoring of the consumer/sessiond interaction so the consumer supports applications instrumented with libust (UST 2.0). At this point, more testing of interaction between libust and sessiond is required. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add sem_wait timeout on the kconsumerd thread It's unlikely to happen but is the kconsumerd was not able to send us the sock ready command, at least the session daemon will not stall forever. A 30 seconds timeout is added and error is handle after that. Also adds the handling of the sem_init ret value and adds mutex lock around the kconsumerd pid in the same function. There was also a problem on error code handling where LTTCOMM error was returned by spawn kconsumerd function but handled as if it might be negative at the end of the call chain. This was preventing to return the right error code to the client when the kconsumerd failed. Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Remove session list lock acquisition of the search The lock/unlock of the session list in the find session by name function is removed thus the caller must held the lock before calling that search function. Also, the path and name are now static size on the stack and not allocated strings at session creation. Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Fix session list deadlock On session destroy, the session list lock is acquired but this call could be made inside a section where this lock is already acquired. The call has been changed to using the session pointer and not the name thus removing a useless list walk. Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Fix enable syscall and bad value of poll set size First, when enabling syscall tracing, on success 0 is return so we don't add this value to the event list or else we were polling on fd 0 which is not a valid event fd. A normal kernel create event, the fd of that event is returned from the ioctl which is not the case for syscalls. Second, the poll size was not reset when updating the kernel poll set so at each kernel poll update, the value was not coherent with the real poll size and thus creating unstable behavior (unknown). This commit MIGHT fix a blocking problem happening when using a custom channel and enabling syscall on it. This issue was reported by Julien Desfossez <julien.desfossez@polymtl.ca>. Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Don't report an error when the last section of the path exist in mkdir_recursive Minor adjustment for perror call changed to PERROR using the lttngerr.h interface. Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com> Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Rename traceable-app and change ust app call Rename traceable-app to ust-app.c/.h and all calls to ust_app_* to be consistent with the code base. Add a channel_ust_copy() to copy UST channel and event list. Mostly used for channel copy between ust session and ust app. Signed-off-by: David Goulet <david.goulet@polymtl.ca>