Relayd: disallow-clear option parsing Parse LTTNG_RELAYD_DISALLOW_CLEAR env variable if present. LTTNG_RELAYD_DISALLOW_CLEAR have priority on the command line argument. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Test: clear: take an additional snapshot after clear for per-pid Use the before-exit sync points of gen-ust-event to prevent the app from exiting and generate a single event to test that tracing functionality still works. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Test: lttng clear command for snapshot session Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Gen-ust-events: add touch and wait sync points before exit. Allows an app to linger until the wait file is created and signals that the app is just before the exit. This is mostly useful for per-pid tracing where trace buffers are cleaned on application teardown. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Gen-ust-events: use options instead of arguments Remove argument dependency and ease usage of feature individually. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
CLI: Implement lttng clear session command Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Sessiond: Implement cmd_clear_session Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Consumer: Implement lttng_consumer_clear_channel This function is responsible for performing all actions needed to clear a given channel. It only supports clear operation on unmonitored channel (snapshot mode) for now. To do so, flush and clear all the channel streams. We use an active flush (consumer_flush_buffer(..., 1)) since we consider the producer active at all time. No reason so far to check for the quiescent state of the channel. This might need to be revisited. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Refactor: rename lttng_consumer_rotate_channel to lttng_consumer_rotate_sample_channel lttng_consumer_rotate_channel does not perform a rotation it performs a sample of the channel. Rename it to reflect this. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>