* Should be called with session mutex held.
*/
static
-int create_ust_event(struct ust_app *app, struct ust_app_session *ua_sess,
+int create_ust_event(struct ust_app *app,
struct ust_app_channel *ua_chan, struct ust_app_event *ua_event)
{
int ret = 0;
* Called with UST app session lock held.
*/
static
-int enable_ust_app_event(struct ust_app_session *ua_sess,
- struct ust_app_event *ua_event, struct ust_app *app)
+int enable_ust_app_event(struct ust_app_event *ua_event,
+ struct ust_app *app)
{
int ret;
/*
* Disable on the tracer side a ust app event for the session and channel.
*/
-static int disable_ust_app_event(struct ust_app_session *ua_sess,
- struct ust_app_event *ua_event, struct ust_app *app)
+static int disable_ust_app_event(struct ust_app_event *ua_event,
+ struct ust_app *app)
{
int ret;
*/
static int do_consumer_create_channel(struct ltt_ust_session *usess,
struct ust_app_session *ua_sess, struct ust_app_channel *ua_chan,
- int bitness, struct ust_registry_session *registry,
- uint64_t trace_archive_id)
+ int bitness, struct ust_registry_session *registry)
{
int ret;
unsigned int nb_fd = 0;
* ust app channel object with all streams and data object.
*/
ret = do_consumer_create_channel(usess, ua_sess, ua_chan,
- app->bits_per_long, reg_uid->registry->reg.ust,
- session->most_recent_chunk_id.value);
+ app->bits_per_long, reg_uid->registry->reg.ust);
if (ret < 0) {
ERR("Error creating UST channel \"%s\" on the consumer daemon",
ua_chan->name);
/* Create and get channel on the consumer side. */
ret = do_consumer_create_channel(usess, ua_sess, ua_chan,
- app->bits_per_long, registry,
- session->most_recent_chunk_id.value);
+ app->bits_per_long, registry);
if (ret < 0) {
ERR("Error creating UST channel \"%s\" on the consumer daemon",
ua_chan->name);
*/
static int ust_app_channel_allocate(struct ust_app_session *ua_sess,
struct ltt_ust_channel *uchan,
- enum lttng_ust_abi_chan_type type, struct ltt_ust_session *usess,
+ enum lttng_ust_abi_chan_type type,
+ struct ltt_ust_session *usess __attribute__((unused)),
struct ust_app_channel **ua_chanp)
{
int ret = 0;
* Called with ust app session mutex held.
*/
static
-int create_ust_app_event(struct ust_app_session *ua_sess,
- struct ust_app_channel *ua_chan, struct ltt_ust_event *uevent,
+int create_ust_app_event(struct ust_app_channel *ua_chan,
+ struct ltt_ust_event *uevent,
struct ust_app *app)
{
int ret = 0;
shadow_copy_event(ua_event, uevent);
/* Create it on the tracer side */
- ret = create_ust_event(app, ua_sess, ua_chan, ua_event);
+ ret = create_ust_event(app, ua_chan, ua_event);
if (ret < 0) {
/*
* Not found previously means that it does not exist on the
continue;
}
- ret = disable_ust_app_event(ua_sess, ua_event, app);
+ ret = disable_ust_app_event(ua_event, app);
if (ret < 0) {
/* XXX: Report error someday... */
continue;
goto next_app;
}
- ret = enable_ust_app_event(ua_sess, ua_event, app);
+ ret = enable_ust_app_event(ua_event, app);
if (ret < 0) {
pthread_mutex_unlock(&ua_sess->lock);
goto error;
ua_chan = caa_container_of(ua_chan_node, struct ust_app_channel, node);
- ret = create_ust_app_event(ua_sess, ua_chan, uevent, app);
+ ret = create_ust_app_event(ua_chan, uevent, app);
pthread_mutex_unlock(&ua_sess->lock);
if (ret < 0) {
if (ret != -LTTNG_UST_ERR_EXIST) {
static
int ust_app_channel_synchronize_event(struct ust_app_channel *ua_chan,
- struct ltt_ust_event *uevent, struct ust_app_session *ua_sess,
+ struct ltt_ust_event *uevent,
struct ust_app *app)
{
int ret = 0;
ua_event = find_ust_app_event(ua_chan->events, uevent->attr.name,
uevent->filter, uevent->attr.loglevel, uevent->exclusion);
if (!ua_event) {
- ret = create_ust_app_event(ua_sess, ua_chan, uevent, app);
+ ret = create_ust_app_event(ua_chan, uevent, app);
if (ret < 0) {
goto end;
}
} else {
if (ua_event->enabled != uevent->enabled) {
ret = uevent->enabled ?
- enable_ust_app_event(ua_sess, ua_event, app) :
- disable_ust_app_event(ua_sess, ua_event, app);
+ enable_ust_app_event(ua_event, app) :
+ disable_ust_app_event(ua_event, app);
}
}
cds_lfht_for_each_entry(uchan->events->ht, &uevent_iter, uevent,
node.node) {
ret = ust_app_channel_synchronize_event(ua_chan,
- uevent, ua_sess, app);
+ uevent, app);
if (ret) {
goto end;
}
*/
enum lttng_error_code ust_app_snapshot_record(
const struct ltt_ust_session *usess,
- const struct consumer_output *output, int wait,
+ const struct consumer_output *output,
uint64_t nb_packets_per_stream)
{
int ret = 0;
buf_reg_chan, node.node) {
status = consumer_snapshot_channel(socket,
buf_reg_chan->consumer_key,
- output, 0, usess->uid,
- usess->gid, &trace_path[consumer_path_offset], wait,
+ output, 0, &trace_path[consumer_path_offset],
nb_packets_per_stream);
if (status != LTTNG_OK) {
goto error;
}
status = consumer_snapshot_channel(socket,
reg->registry->reg.ust->metadata_key, output, 1,
- usess->uid, usess->gid, &trace_path[consumer_path_offset],
- wait, 0);
+ &trace_path[consumer_path_offset], 0);
if (status != LTTNG_OK) {
goto error;
}
ua_chan, node.node) {
status = consumer_snapshot_channel(socket,
ua_chan->key, output, 0,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
- &trace_path[consumer_path_offset], wait,
+ &trace_path[consumer_path_offset],
nb_packets_per_stream);
switch (status) {
case LTTNG_OK:
}
status = consumer_snapshot_channel(socket,
registry->metadata_key, output, 1,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
- &trace_path[consumer_path_offset], wait, 0);
+ &trace_path[consumer_path_offset], 0);
switch (status) {
case LTTNG_OK:
break;
buf_reg_chan, node.node) {
ret = consumer_rotate_channel(socket,
buf_reg_chan->consumer_key,
- usess->uid, usess->gid,
usess->consumer,
/* is_metadata_channel */ false);
if (ret < 0) {
ret = consumer_rotate_channel(socket,
reg->registry->reg.ust->metadata_key,
- usess->uid, usess->gid,
usess->consumer,
/* is_metadata_channel */ true);
if (ret < 0) {
ua_chan, node.node) {
ret = consumer_rotate_channel(socket,
ua_chan->key,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
ua_sess->consumer,
/* is_metadata_channel */ false);
if (ret < 0) {
(void) push_metadata(registry, usess->consumer);
ret = consumer_rotate_channel(socket,
registry->metadata_key,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
ua_sess->consumer,
/* is_metadata_channel */ true);
if (ret < 0) {