- ret = cmd_enable_event(session, &tmp_dom, DEFAULT_JUL_CHANNEL_NAME,
- &uevent, NULL, wpipe);
- if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) {
- goto error;
- }
-
- /* The wild card * means that everything should be enabled. */
- if (strncmp(event->name, "*", 1) == 0 && strlen(event->name) == 1) {
- ret = event_jul_enable_all(usess);
- } else {
- ret = event_jul_enable(usess, event);
- }
- if (ret != LTTNG_OK) {
- goto error;
- }
-
- break;
- }
-#if 0
- case LTTNG_DOMAIN_UST_EXEC_NAME:
- case LTTNG_DOMAIN_UST_PID:
- case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
-#endif
- default:
- ret = LTTNG_ERR_UND;
- goto error;
- }
-
- ret = LTTNG_OK;
-
-error:
- rcu_read_unlock();
- return ret;
-}
-
-/*
- * Command LTTNG_ENABLE_ALL_EVENT processed by the client thread.
- */
-int cmd_enable_event_all(struct ltt_session *session,
- struct lttng_domain *domain, char *channel_name, int event_type,
- struct lttng_filter_bytecode *filter, int wpipe)
-{
- int ret;
- struct lttng_channel *attr;
-
- assert(session);
- assert(channel_name);
-
- rcu_read_lock();
-
- switch (domain->type) {
- case LTTNG_DOMAIN_KERNEL:
- {
- struct ltt_kernel_channel *kchan;
-
- assert(session->kernel_session);
-
- /*
- * If a non-default channel has been created in the
- * session, explicitely require that -c chan_name needs
- * to be provided.
- */
- if (session->kernel_session->has_non_default_channel
- && channel_name[0] == '\0') {
- ret = LTTNG_ERR_NEED_CHANNEL_NAME;
- goto error;
- }
-
- kchan = trace_kernel_get_channel_by_name(channel_name,
- session->kernel_session);
- if (kchan == NULL) {
- /* Create default channel */
- attr = channel_new_default_attr(LTTNG_DOMAIN_KERNEL,
- LTTNG_BUFFER_GLOBAL);
- if (attr == NULL) {
- ret = LTTNG_ERR_FATAL;
- goto error;
- }
- strncpy(attr->name, channel_name, sizeof(attr->name));
-
- ret = cmd_enable_channel(session, domain, attr, wpipe);
- if (ret != LTTNG_OK) {
- free(attr);
- goto error;
- }
- free(attr);
-
- /* Get the newly created kernel channel pointer */
- kchan = trace_kernel_get_channel_by_name(channel_name,
- session->kernel_session);
- assert(kchan);
- }
-
- switch (event_type) {
- case LTTNG_EVENT_SYSCALL:
- ret = event_kernel_enable_all_syscalls(kchan, kernel_tracer_fd);