cds_lfht_for_each_entry(uchan->events, &iter, uevent, node) {
strncpy(tmp[i].name, uevent->attr.name, LTTNG_SYMBOL_NAME_LEN);
tmp[i].name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
+ tmp[i].enabled = uevent->enabled;
switch (uevent->attr.instrumentation) {
case LTTNG_UST_TRACEPOINT:
tmp[i].type = LTTNG_EVENT_TRACEPOINT;
goto error;
}
+ uchan->enabled = 1;
+
break;
}
case LTTNG_DOMAIN_UST_PID:
hashtable_add_unique(uchan->events, &uevent->node);
rcu_read_unlock();
+ uevent->enabled = 1;
+
DBG3("UST ltt event %s added to channel %s", uevent->attr.name,
uchan->name);
break;
int ret;
struct ltt_ust_channel *luc;
- luc = malloc(sizeof(struct ltt_ust_channel));
+ luc = zmalloc(sizeof(struct ltt_ust_channel));
if (luc == NULL) {
perror("ltt_ust_channel malloc");
goto error;
{
struct ltt_ust_event *lue;
- lue = malloc(sizeof(struct ltt_ust_event));
+ lue = zmalloc(sizeof(struct ltt_ust_event));
if (lue == NULL) {
PERROR("ust event malloc");
goto error;
/* UST event */
struct ltt_ust_event {
+ unsigned int enabled;
struct lttng_ust_event attr;
struct cds_lfht *ctx;
struct cds_lfht_node node;
/* UST channel */
struct ltt_ust_channel {
+ unsigned int enabled;
char name[LTTNG_UST_SYM_NAME_LEN];
char pathname[PATH_MAX];
struct lttng_ust_channel attr;