NOTE: When listing all UST events from all registered apps, the enabled
state is set to -1 meaning that there is no enable/disable state
semantic at this point.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
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';
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;
switch (uevent->attr.instrumentation) {
case LTTNG_UST_TRACEPOINT:
tmp[i].type = LTTNG_EVENT_TRACEPOINT;
break;
}
case LTTNG_DOMAIN_UST_PID:
break;
}
case LTTNG_DOMAIN_UST_PID:
hashtable_add_unique(uchan->events, &uevent->node);
rcu_read_unlock();
hashtable_add_unique(uchan->events, &uevent->node);
rcu_read_unlock();
DBG3("UST ltt event %s added to channel %s", uevent->attr.name,
uchan->name);
break;
DBG3("UST ltt event %s added to channel %s", uevent->attr.name,
uchan->name);
break;
int ret;
struct ltt_ust_channel *luc;
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;
if (luc == NULL) {
perror("ltt_ust_channel malloc");
goto error;
{
struct ltt_ust_event *lue;
{
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;
if (lue == NULL) {
PERROR("ust event malloc");
goto error;
/* UST event */
struct ltt_ust_event {
/* UST event */
struct ltt_ust_event {
struct lttng_ust_event attr;
struct cds_lfht *ctx;
struct cds_lfht_node node;
struct lttng_ust_event attr;
struct cds_lfht *ctx;
struct cds_lfht_node node;
/* UST channel */
struct ltt_ust_channel {
/* UST channel */
struct ltt_ust_channel {
char name[LTTNG_UST_SYM_NAME_LEN];
char pathname[PATH_MAX];
struct lttng_ust_channel attr;
char name[LTTNG_UST_SYM_NAME_LEN];
char pathname[PATH_MAX];
struct lttng_ust_channel attr;
tmp[count].type = LTTNG_UST_TRACEPOINT;
tmp[count].pid = app->key.pid;
tmp[count].type = LTTNG_UST_TRACEPOINT;
tmp[count].pid = app->key.pid;
+ tmp[count].enabled = -1;