static int validate_ust_event_name(const char *);
static int cmd_enable_event_internal(struct ltt_session *session,
static int validate_ust_event_name(const char *);
static int cmd_enable_event_internal(struct ltt_session *session,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
* The wpipe arguments is used as a notifier for the kernel thread.
*/
int cmd_enable_channel(struct ltt_session *session,
* The wpipe arguments is used as a notifier for the kernel thread.
*/
int cmd_enable_channel(struct ltt_session *session,
- if (attr->name[0] == '.' ||
- memchr(attr->name, '/', len) != NULL) {
+ if (attr.name[0] == '.' ||
+ memchr(attr.name, '/', len) != NULL) {
WARN("Kernel tracer does not support buffer monitoring. "
"Setting the monitor interval timer to 0 "
"(disabled) for channel '%s' of session '%s'",
WARN("Kernel tracer does not support buffer monitoring. "
"Setting the monitor interval timer to 0 "
"(disabled) for channel '%s' of session '%s'",
- attr-> name, session->name);
- lttng_channel_set_monitor_timer_interval(attr, 0);
+ attr.name, session->name);
+ lttng_channel_set_monitor_timer_interval(&attr, 0);
session->kernel_session);
if (kchan == NULL) {
if (session->snapshot.nb_output > 0 ||
session->snapshot_mode) {
/* Enforce mmap output for snapshot sessions. */
session->kernel_session);
if (kchan == NULL) {
if (session->snapshot.nb_output > 0 ||
session->snapshot_mode) {
/* Enforce mmap output for snapshot sessions. */
- ret = channel_kernel_create(session->kernel_session, attr, wpipe);
- if (attr->name[0] != '\0') {
+ ret = channel_kernel_create(session->kernel_session, &attr, wpipe);
+ if (attr.name[0] != '\0') {
LTTNG_SYMBOL_NAME_LEN)) {
ret = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_LOG4J) {
LTTNG_SYMBOL_NAME_LEN)) {
ret = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_LOG4J) {
LTTNG_SYMBOL_NAME_LEN)) {
ret = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_PYTHON) {
LTTNG_SYMBOL_NAME_LEN)) {
ret = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_PYTHON) {
- ret = channel_ust_create(usess, attr, domain->buf_type);
- if (attr->name[0] != '\0') {
+ ret = channel_ust_create(usess, &attr, domain->buf_type);
+ if (attr.name[0] != '\0') {
* Command LTTNG_DISABLE_EVENT processed by the client thread.
*/
int cmd_disable_event(struct ltt_session *session,
* Command LTTNG_DISABLE_EVENT processed by the client thread.
*/
int cmd_disable_event(struct ltt_session *session,
- enum lttng_domain_type domain, char *channel_name,
- struct lttng_event *event)
+ enum lttng_domain_type domain, const char *channel_name,
+ const struct lttng_event *event)
* Command LTTNG_ADD_CONTEXT processed by the client thread.
*/
int cmd_add_context(struct ltt_session *session, enum lttng_domain_type domain,
* Command LTTNG_ADD_CONTEXT processed by the client thread.
*/
int cmd_add_context(struct ltt_session *session, enum lttng_domain_type domain,
{
int ret, chan_kern_created = 0, chan_ust_created = 0;
char *app_ctx_provider_name = NULL, *app_ctx_name = NULL;
{
int ret, chan_kern_created = 0, chan_ust_created = 0;
char *app_ctx_provider_name = NULL, *app_ctx_name = NULL;
* enable the events through which all "agent" events are funeled.
*/
static int _cmd_enable_event(struct ltt_session *session,
* enable the events through which all "agent" events are funeled.
*/
static int _cmd_enable_event(struct ltt_session *session,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
* Command LTTNG_ENABLE_EVENT processed by the client thread.
* We own filter, exclusion, and filter_expression.
*/
* Command LTTNG_ENABLE_EVENT processed by the client thread.
* We own filter, exclusion, and filter_expression.
*/
-int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
+int cmd_enable_event(struct ltt_session *session,
+ const struct lttng_domain *domain,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
char *channel_name, struct lttng_event *event,
char *filter_expression,
struct lttng_filter_bytecode *filter,
struct lttng_trace_archive_location *location = NULL;
struct lttcomm_lttng_msg llm = {
.cmd_type = LTTNG_DESTROY_SESSION,
struct lttng_trace_archive_location *location = NULL;
struct lttcomm_lttng_msg llm = {
.cmd_type = LTTNG_DESTROY_SESSION,
/* Carry on with the destruction of the session. */
ERR("Failed to stop session \"%s\" as part of its destruction: %s",
session->name, lttng_strerror(-ret));
/* Carry on with the destruction of the session. */
ERR("Failed to stop session \"%s\" as part of its destruction: %s",
session->name, lttng_strerror(-ret));
if (ret != LTTNG_OK) {
ERR("Failed to perform an implicit rotation as part of the destruction of session \"%s\": %s",
session->name, lttng_strerror(-ret));
if (ret != LTTNG_OK) {
ERR("Failed to perform an implicit rotation as part of the destruction of session \"%s\": %s",
session->name, lttng_strerror(-ret));
if (ret != LTTNG_OK) {
ERR("Failed to perform a quiet rotation as part of the destruction of session \"%s\": %s",
session->name, lttng_strerror(-ret));
if (ret != LTTNG_OK) {
ERR("Failed to perform a quiet rotation as part of the destruction of session \"%s\": %s",
session->name, lttng_strerror(-ret));
ret = session_add_destroy_notifier(session,
cmd_destroy_session_reply,
(void *) reply_context);
ret = session_add_destroy_notifier(session,
cmd_destroy_session_reply,
(void *) reply_context);
* Return LTTNG_OK on success or else a LTTNG_ERR code.
*/
int cmd_snapshot_add_output(struct ltt_session *session,
* Return LTTNG_OK on success or else a LTTNG_ERR code.
*/
int cmd_snapshot_add_output(struct ltt_session *session,
* Return LTTNG_OK on success or else a LTTNG_ERR code.
*/
int cmd_snapshot_del_output(struct ltt_session *session,
* Return LTTNG_OK on success or else a LTTNG_ERR code.
*/
int cmd_snapshot_del_output(struct ltt_session *session,
* Return LTTNG_OK on success or else a LTTNG_ERR code.
*/
int cmd_snapshot_record(struct ltt_session *session,
* Return LTTNG_OK on success or else a LTTNG_ERR code.
*/
int cmd_snapshot_record(struct ltt_session *session,