/* Data structures used by the tracer. */
-enum lttng_enabler_type {
- LTTNG_ENABLER_STAR_GLOB,
- LTTNG_ENABLER_EVENT,
+enum lttng_enabler_format_type {
+ LTTNG_ENABLER_FORMAT_STAR_GLOB,
+ LTTNG_ENABLER_FORMAT_EVENT,
};
/*
* backward reference.
*/
struct lttng_enabler {
- enum lttng_enabler_type type;
+ enum lttng_enabler_format_type format_type;
/* head list of struct lttng_ust_filter_bytecode_node */
struct cds_list_head filter_bytecode_head;
int lttng_channel_enable(struct lttng_channel *channel);
int lttng_channel_disable(struct lttng_channel *channel);
-struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type,
+struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_format_type type,
struct lttng_ust_event *event_param,
struct lttng_channel *chan);
int lttng_enabler_enable(struct lttng_enabler *enabler);
int loglevel = 0;
unsigned int has_loglevel = 0;
- assert(enabler->type == LTTNG_ENABLER_STAR_GLOB);
+ assert(enabler->format_type == LTTNG_ENABLER_FORMAT_STAR_GLOB);
if (!strutils_star_glob_match(enabler->event_param.name, SIZE_MAX,
desc->name, SIZE_MAX))
return 0;
int loglevel = 0;
unsigned int has_loglevel = 0;
- assert(enabler->type == LTTNG_ENABLER_EVENT);
+ assert(enabler->format_type == LTTNG_ENABLER_FORMAT_EVENT);
if (strcmp(desc->name, enabler->event_param.name))
return 0;
if (desc->loglevel) {
int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
struct lttng_enabler *enabler)
{
- switch (enabler->type) {
- case LTTNG_ENABLER_STAR_GLOB:
+ switch (enabler->format_type) {
+ case LTTNG_ENABLER_FORMAT_STAR_GLOB:
{
struct lttng_ust_excluder_node *excluder;
}
return 1;
}
- case LTTNG_ENABLER_EVENT:
+ case LTTNG_ENABLER_FORMAT_EVENT:
return lttng_desc_match_event_enabler(desc, enabler);
default:
return -EINVAL;
/*
* Enabler management.
*/
-struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type,
+struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_format_type format_type,
struct lttng_ust_event *event_param,
struct lttng_channel *chan)
{
enabler = zmalloc(sizeof(*enabler));
if (!enabler)
return NULL;
- enabler->type = type;
+ enabler->format_type = format_type;
CDS_INIT_LIST_HEAD(&enabler->filter_bytecode_head);
CDS_INIT_LIST_HEAD(&enabler->excluder_head);
memcpy(&enabler->event_param, event_param,
int lttng_abi_create_enabler(int channel_objd,
struct lttng_ust_event *event_param,
void *owner,
- enum lttng_enabler_type type)
+ enum lttng_enabler_format_type format_type)
{
struct lttng_channel *channel = objd_private(channel_objd);
struct lttng_enabler *enabler;
* We tolerate no failure path after event creation. It will stay
* invariant for the rest of the session.
*/
- enabler = lttng_enabler_create(type, event_param, channel);
+ enabler = lttng_enabler_create(format_type, event_param, channel);
if (!enabler) {
ret = -ENOMEM;
goto event_error;
* we create the special star globbing enabler.
*/
return lttng_abi_create_enabler(objd, event_param,
- owner, LTTNG_ENABLER_STAR_GLOB);
+ owner, LTTNG_ENABLER_FORMAT_STAR_GLOB);
} else {
return lttng_abi_create_enabler(objd, event_param,
- owner, LTTNG_ENABLER_EVENT);
+ owner, LTTNG_ENABLER_FORMAT_EVENT);
}
}
case LTTNG_UST_CONTEXT: