struct cds_list_head lnode;
union {
/* Original object data that MUST be copied over. */
- struct lttng_ust_object_data *ust;
+ struct lttng_ust_abi_object_data *ust;
} obj;
};
size_t num_subbuf;
union {
/* Original object data that MUST be copied over. */
- struct lttng_ust_object_data *ust;
+ struct lttng_ust_abi_object_data *ust;
} obj;
};
* Map enum lttng_ust_output to enum lttng_event_output.
*/
switch (uchan->attr.output) {
- case LTTNG_UST_MMAP:
+ case LTTNG_UST_ABI_MMAP:
channels[i].attr.output = LTTNG_EVENT_MMAP;
break;
default:
event.enabled = uevent->enabled;
switch (uevent->attr.instrumentation) {
- case LTTNG_UST_TRACEPOINT:
+ case LTTNG_UST_ABI_TRACEPOINT:
event.type = LTTNG_EVENT_TRACEPOINT;
break;
- case LTTNG_UST_PROBE:
+ case LTTNG_UST_ABI_PROBE:
event.type = LTTNG_EVENT_PROBE;
break;
- case LTTNG_UST_FUNCTION:
+ case LTTNG_UST_ABI_FUNCTION:
event.type = LTTNG_EVENT_FUNCTION;
break;
}
event.loglevel = uevent->attr.loglevel;
switch (uevent->attr.loglevel_type) {
- case LTTNG_UST_LOGLEVEL_ALL:
+ case LTTNG_UST_ABI_LOGLEVEL_ALL:
event.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
break;
- case LTTNG_UST_LOGLEVEL_RANGE:
+ case LTTNG_UST_ABI_LOGLEVEL_RANGE:
event.loglevel_type = LTTNG_EVENT_LOGLEVEL_RANGE;
break;
- case LTTNG_UST_LOGLEVEL_SINGLE:
+ case LTTNG_UST_ABI_LOGLEVEL_SINGLE:
event.loglevel_type = LTTNG_EVENT_LOGLEVEL_SINGLE;
break;
}
rcu_read_lock();
uevent = trace_ust_find_event(uchan->events, event->name, filter,
- (enum lttng_ust_loglevel_type) event->loglevel_type,
+ (enum lttng_ust_abi_loglevel_type) event->loglevel_type,
event->loglevel, exclusion);
if (!uevent) {
ret = trace_ust_create_event(event, filter_expression,
* ignored since the type is LTTNG_UST_LOGLEVEL_ALL.
*/
uevent = trace_ust_find_event(uchan->events, (char *) ust_event_name,
- aevent->filter, LTTNG_UST_LOGLEVEL_ALL, -1, NULL);
+ aevent->filter, LTTNG_UST_ABI_LOGLEVEL_ALL, -1, NULL);
/* If the agent event exists, it must be available on the UST side. */
assert(uevent);
void *reception_buffer;
size_t reception_size;
- struct lttng_ust_event_notifier_notification ust_notification;
+ struct lttng_ust_abi_event_notifier_notification ust_notification;
struct lttng_kernel_event_notifier_notification kernel_notification;
/* Init lttng_event_notifier_notification */
/* Return LTTNG_OK on success else a LTTNG_ERR* code. */
static
int save_ust_channel_attributes(struct config_writer *writer,
- struct lttng_ust_channel_attr *attr)
+ struct lttng_ust_abi_channel_attr *attr)
{
int ret;
struct ltt_ust_channel *channel = NULL;
ret = config_writer_write_element_string(writer,
config_element_output_type,
- attr->output == LTTNG_UST_MMAP ?
+ attr->output == LTTNG_UST_ABI_MMAP ?
config_output_type_mmap : config_output_type_splice);
if (ret) {
ret = LTTNG_ERR_SAVE_IO_FAIL;
static
const char *get_ust_context_type_string(
- enum lttng_ust_context_type context_type)
+ enum lttng_ust_abi_context_type context_type)
{
const char *context_type_string;
switch (context_type) {
- case LTTNG_UST_CONTEXT_PROCNAME:
+ case LTTNG_UST_ABI_CONTEXT_PROCNAME:
context_type_string = config_event_context_procname;
break;
- case LTTNG_UST_CONTEXT_VPID:
+ case LTTNG_UST_ABI_CONTEXT_VPID:
context_type_string = config_event_context_vpid;
break;
- case LTTNG_UST_CONTEXT_VTID:
+ case LTTNG_UST_ABI_CONTEXT_VTID:
context_type_string = config_event_context_vtid;
break;
- case LTTNG_UST_CONTEXT_IP:
+ case LTTNG_UST_ABI_CONTEXT_IP:
context_type_string = config_event_context_ip;
break;
- case LTTNG_UST_CONTEXT_PTHREAD_ID:
+ case LTTNG_UST_ABI_CONTEXT_PTHREAD_ID:
context_type_string = config_event_context_pthread_id;
break;
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
context_type_string = config_event_context_app;
break;
- case LTTNG_UST_CONTEXT_CGROUP_NS:
+ case LTTNG_UST_ABI_CONTEXT_CGROUP_NS:
context_type_string = config_event_context_cgroup_ns;
break;
- case LTTNG_UST_CONTEXT_IPC_NS:
+ case LTTNG_UST_ABI_CONTEXT_IPC_NS:
context_type_string = config_event_context_ipc_ns;
break;
- case LTTNG_UST_CONTEXT_MNT_NS:
+ case LTTNG_UST_ABI_CONTEXT_MNT_NS:
context_type_string = config_event_context_mnt_ns;
break;
- case LTTNG_UST_CONTEXT_NET_NS:
+ case LTTNG_UST_ABI_CONTEXT_NET_NS:
context_type_string = config_event_context_net_ns;
break;
- case LTTNG_UST_CONTEXT_TIME_NS:
+ case LTTNG_UST_ABI_CONTEXT_TIME_NS:
context_type_string = config_event_context_time_ns;
break;
- case LTTNG_UST_CONTEXT_PID_NS:
+ case LTTNG_UST_ABI_CONTEXT_PID_NS:
context_type_string = config_event_context_pid_ns;
break;
- case LTTNG_UST_CONTEXT_USER_NS:
+ case LTTNG_UST_ABI_CONTEXT_USER_NS:
context_type_string = config_event_context_user_ns;
break;
- case LTTNG_UST_CONTEXT_UTS_NS:
+ case LTTNG_UST_ABI_CONTEXT_UTS_NS:
context_type_string = config_event_context_uts_ns;
break;
- case LTTNG_UST_CONTEXT_VUID:
+ case LTTNG_UST_ABI_CONTEXT_VUID:
context_type_string = config_event_context_vuid;
break;
- case LTTNG_UST_CONTEXT_VEUID:
+ case LTTNG_UST_ABI_CONTEXT_VEUID:
context_type_string = config_event_context_veuid;
break;
- case LTTNG_UST_CONTEXT_VSUID:
+ case LTTNG_UST_ABI_CONTEXT_VSUID:
context_type_string = config_event_context_vsuid;
break;
- case LTTNG_UST_CONTEXT_VGID:
+ case LTTNG_UST_ABI_CONTEXT_VGID:
context_type_string = config_event_context_vgid;
break;
- case LTTNG_UST_CONTEXT_VEGID:
+ case LTTNG_UST_ABI_CONTEXT_VEGID:
context_type_string = config_event_context_vegid;
break;
- case LTTNG_UST_CONTEXT_VSGID:
+ case LTTNG_UST_ABI_CONTEXT_VSGID:
context_type_string = config_event_context_vsgid;
break;
- case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+ case LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER:
/*
* Error, should not be stored in the XML, perf contexts
* are stored as a node of type event_perf_context_type.
static
const char *get_loglevel_type_string(
- enum lttng_ust_loglevel_type loglevel_type)
+ enum lttng_ust_abi_loglevel_type loglevel_type)
{
const char *loglevel_type_string;
switch (loglevel_type) {
- case LTTNG_UST_LOGLEVEL_ALL:
+ case LTTNG_UST_ABI_LOGLEVEL_ALL:
loglevel_type_string = config_loglevel_type_all;
break;
- case LTTNG_UST_LOGLEVEL_RANGE:
+ case LTTNG_UST_ABI_LOGLEVEL_RANGE:
loglevel_type_string = config_loglevel_type_range;
break;
- case LTTNG_UST_LOGLEVEL_SINGLE:
+ case LTTNG_UST_ABI_LOGLEVEL_SINGLE:
loglevel_type_string = config_loglevel_type_single;
break;
default:
goto end;
}
- if (event->attr.instrumentation != LTTNG_UST_TRACEPOINT) {
+ if (event->attr.instrumentation != LTTNG_UST_ABI_TRACEPOINT) {
ERR("Unsupported UST instrumentation type.");
ret = LTTNG_ERR_INVALID;
goto end;
}
/* The log level is irrelevant if no "filtering" is enabled */
- if (event->attr.loglevel_type != LTTNG_UST_LOGLEVEL_ALL) {
+ if (event->attr.loglevel_type != LTTNG_UST_ABI_LOGLEVEL_ALL) {
ret = config_writer_write_element_signed_int(writer,
config_element_loglevel, event->attr.loglevel);
if (ret) {
struct agent_event *agent_event)
{
int ret;
- enum lttng_ust_loglevel_type ust_loglevel_type;
+ enum lttng_ust_abi_loglevel_type ust_loglevel_type;
ust_event->enabled = AGENT_EVENT_IS_ENABLED(agent_event);
- ust_event->attr.instrumentation = LTTNG_UST_TRACEPOINT;
+ ust_event->attr.instrumentation = LTTNG_UST_ABI_TRACEPOINT;
if (lttng_strncpy(ust_event->attr.name, agent_event->name,
LTTNG_SYMBOL_NAME_LEN)) {
ret = LTTNG_ERR_INVALID;
}
switch (agent_event->loglevel_type) {
case LTTNG_EVENT_LOGLEVEL_ALL:
- ust_loglevel_type = LTTNG_UST_LOGLEVEL_ALL;
+ ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_ALL;
break;
case LTTNG_EVENT_LOGLEVEL_SINGLE:
- ust_loglevel_type = LTTNG_UST_LOGLEVEL_SINGLE;
+ ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_SINGLE;
break;
case LTTNG_EVENT_LOGLEVEL_RANGE:
- ust_loglevel_type = LTTNG_UST_LOGLEVEL_RANGE;
+ ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_RANGE;
break;
default:
ERR("Invalid agent_event loglevel_type.");
}
switch (ctx->ctx.ctx) {
- case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+ case LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER:
ret = save_ust_context_perf_thread_counter(writer, ctx);
break;
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
ret = save_ust_context_app_ctx(writer, ctx);
break;
default:
/* Event loglevel value and type. */
ll_match = loglevels_match(event->attr.loglevel_type,
ev_loglevel_value, key->loglevel_type,
- key->loglevel_value, LTTNG_UST_LOGLEVEL_ALL);
+ key->loglevel_value, LTTNG_UST_ABI_LOGLEVEL_ALL);
if (!ll_match) {
goto no_match;
*/
struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
char *name, struct lttng_bytecode *filter,
- enum lttng_ust_loglevel_type loglevel_type, int loglevel_value,
+ enum lttng_ust_abi_loglevel_type loglevel_type, int loglevel_value,
struct lttng_event_exclusion *exclusion)
{
struct lttng_ht_node_str *node;
lus->metadata_attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM;
lus->metadata_attr.switch_timer_interval = DEFAULT_METADATA_SWITCH_TIMER;
lus->metadata_attr.read_timer_interval = DEFAULT_METADATA_READ_TIMER;
- lus->metadata_attr.output = LTTNG_UST_MMAP;
+ lus->metadata_attr.output = LTTNG_UST_ABI_MMAP;
/*
* Default buffer type. This can be changed through an enable channel
luc->attr.num_subbuf = chan->attr.num_subbuf;
luc->attr.switch_timer_interval = chan->attr.switch_timer_interval;
luc->attr.read_timer_interval = chan->attr.read_timer_interval;
- luc->attr.output = (enum lttng_ust_output) chan->attr.output;
+ luc->attr.output = (enum lttng_ust_abi_output) chan->attr.output;
luc->monitor_timer_interval = ((struct lttng_channel_extended *)
chan->attr.extended.ptr)->monitor_timer_interval;
luc->attr.u.s.blocking_timeout = ((struct lttng_channel_extended *)
/* Translate to UST output enum */
switch (luc->attr.output) {
default:
- luc->attr.output = LTTNG_UST_MMAP;
+ luc->attr.output = LTTNG_UST_ABI_MMAP;
break;
}
/* Copy channel name */
strncpy(luc->name, chan->name, sizeof(luc->name));
}
- luc->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ luc->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
/* Init node */
lttng_ht_node_init_str(&luc->node, luc->name);
switch (ev->type) {
case LTTNG_EVENT_PROBE:
- local_ust_event->attr.instrumentation = LTTNG_UST_PROBE;
+ local_ust_event->attr.instrumentation = LTTNG_UST_ABI_PROBE;
break;
case LTTNG_EVENT_FUNCTION:
- local_ust_event->attr.instrumentation = LTTNG_UST_FUNCTION;
+ local_ust_event->attr.instrumentation = LTTNG_UST_ABI_FUNCTION;
break;
case LTTNG_EVENT_FUNCTION_ENTRY:
- local_ust_event->attr.instrumentation = LTTNG_UST_FUNCTION;
+ local_ust_event->attr.instrumentation = LTTNG_UST_ABI_FUNCTION;
break;
case LTTNG_EVENT_TRACEPOINT:
- local_ust_event->attr.instrumentation = LTTNG_UST_TRACEPOINT;
+ local_ust_event->attr.instrumentation = LTTNG_UST_ABI_TRACEPOINT;
break;
default:
ERR("Unknown ust instrumentation type (%d)", ev->type);
}
/* Copy event name */
- strncpy(local_ust_event->attr.name, ev->name, LTTNG_UST_SYM_NAME_LEN);
- local_ust_event->attr.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(local_ust_event->attr.name, ev->name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ local_ust_event->attr.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
switch (ev->loglevel_type) {
case LTTNG_EVENT_LOGLEVEL_ALL:
- local_ust_event->attr.loglevel_type = LTTNG_UST_LOGLEVEL_ALL;
+ local_ust_event->attr.loglevel_type = LTTNG_UST_ABI_LOGLEVEL_ALL;
local_ust_event->attr.loglevel = -1; /* Force to -1 */
break;
case LTTNG_EVENT_LOGLEVEL_RANGE:
- local_ust_event->attr.loglevel_type = LTTNG_UST_LOGLEVEL_RANGE;
+ local_ust_event->attr.loglevel_type = LTTNG_UST_ABI_LOGLEVEL_RANGE;
local_ust_event->attr.loglevel = ev->loglevel;
break;
case LTTNG_EVENT_LOGLEVEL_SINGLE:
- local_ust_event->attr.loglevel_type = LTTNG_UST_LOGLEVEL_SINGLE;
+ local_ust_event->attr.loglevel_type = LTTNG_UST_ABI_LOGLEVEL_SINGLE;
local_ust_event->attr.loglevel = ev->loglevel;
break;
default:
switch (type) {
case LTTNG_EVENT_CONTEXT_VTID:
- utype = LTTNG_UST_CONTEXT_VTID;
+ utype = LTTNG_UST_ABI_CONTEXT_VTID;
break;
case LTTNG_EVENT_CONTEXT_VPID:
- utype = LTTNG_UST_CONTEXT_VPID;
+ utype = LTTNG_UST_ABI_CONTEXT_VPID;
break;
case LTTNG_EVENT_CONTEXT_PTHREAD_ID:
- utype = LTTNG_UST_CONTEXT_PTHREAD_ID;
+ utype = LTTNG_UST_ABI_CONTEXT_PTHREAD_ID;
break;
case LTTNG_EVENT_CONTEXT_PROCNAME:
- utype = LTTNG_UST_CONTEXT_PROCNAME;
+ utype = LTTNG_UST_ABI_CONTEXT_PROCNAME;
break;
case LTTNG_EVENT_CONTEXT_IP:
- utype = LTTNG_UST_CONTEXT_IP;
+ utype = LTTNG_UST_ABI_CONTEXT_IP;
break;
case LTTNG_EVENT_CONTEXT_PERF_THREAD_COUNTER:
if (!ustctl_has_perf_counters()) {
utype = -1;
WARN("Perf counters not implemented in UST");
} else {
- utype = LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER;
+ utype = LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER;
}
break;
case LTTNG_EVENT_CONTEXT_APP_CONTEXT:
- utype = LTTNG_UST_CONTEXT_APP_CONTEXT;
+ utype = LTTNG_UST_ABI_CONTEXT_APP_CONTEXT;
break;
case LTTNG_EVENT_CONTEXT_CGROUP_NS:
- utype = LTTNG_UST_CONTEXT_CGROUP_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_CGROUP_NS;
break;
case LTTNG_EVENT_CONTEXT_IPC_NS:
- utype = LTTNG_UST_CONTEXT_IPC_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_IPC_NS;
break;
case LTTNG_EVENT_CONTEXT_MNT_NS:
- utype = LTTNG_UST_CONTEXT_MNT_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_MNT_NS;
break;
case LTTNG_EVENT_CONTEXT_NET_NS:
- utype = LTTNG_UST_CONTEXT_NET_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_NET_NS;
break;
case LTTNG_EVENT_CONTEXT_PID_NS:
- utype = LTTNG_UST_CONTEXT_PID_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_PID_NS;
break;
case LTTNG_EVENT_CONTEXT_TIME_NS:
- utype = LTTNG_UST_CONTEXT_TIME_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_TIME_NS;
break;
case LTTNG_EVENT_CONTEXT_USER_NS:
- utype = LTTNG_UST_CONTEXT_USER_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_USER_NS;
break;
case LTTNG_EVENT_CONTEXT_UTS_NS:
- utype = LTTNG_UST_CONTEXT_UTS_NS;
+ utype = LTTNG_UST_ABI_CONTEXT_UTS_NS;
break;
case LTTNG_EVENT_CONTEXT_VUID:
- utype = LTTNG_UST_CONTEXT_VUID;
+ utype = LTTNG_UST_ABI_CONTEXT_VUID;
break;
case LTTNG_EVENT_CONTEXT_VEUID:
- utype = LTTNG_UST_CONTEXT_VEUID;
+ utype = LTTNG_UST_ABI_CONTEXT_VEUID;
break;
case LTTNG_EVENT_CONTEXT_VSUID:
- utype = LTTNG_UST_CONTEXT_VSUID;
+ utype = LTTNG_UST_ABI_CONTEXT_VSUID;
break;
case LTTNG_EVENT_CONTEXT_VGID:
- utype = LTTNG_UST_CONTEXT_VGID;
+ utype = LTTNG_UST_ABI_CONTEXT_VGID;
break;
case LTTNG_EVENT_CONTEXT_VEGID:
- utype = LTTNG_UST_CONTEXT_VEGID;
+ utype = LTTNG_UST_ABI_CONTEXT_VEGID;
break;
case LTTNG_EVENT_CONTEXT_VSGID:
- utype = LTTNG_UST_CONTEXT_VSGID;
+ utype = LTTNG_UST_ABI_CONTEXT_VSGID;
break;
default:
utype = -1;
return 0;
}
switch (utype) {
- case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+ case LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER:
if (uctx->ctx.u.perf_counter.type
!= ctx->u.perf_counter.type) {
return 0;
}
if (strncmp(uctx->ctx.u.perf_counter.name,
ctx->u.perf_counter.name,
- LTTNG_UST_SYM_NAME_LEN)) {
+ LTTNG_UST_ABI_SYM_NAME_LEN)) {
return 0;
}
break;
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
assert(uctx->ctx.u.app_ctx.provider_name);
assert(uctx->ctx.u.app_ctx.ctx_name);
if (strcmp(uctx->ctx.u.app_ctx.provider_name,
goto end;
}
- uctx->ctx.ctx = (enum lttng_ust_context_type) utype;
+ uctx->ctx.ctx = (enum lttng_ust_abi_context_type) utype;
switch (utype) {
- case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+ case LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER:
uctx->ctx.u.perf_counter.type = ctx->u.perf_counter.type;
uctx->ctx.u.perf_counter.config = ctx->u.perf_counter.config;
strncpy(uctx->ctx.u.perf_counter.name, ctx->u.perf_counter.name,
- LTTNG_UST_SYM_NAME_LEN);
- uctx->ctx.u.perf_counter.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ uctx->ctx.u.perf_counter.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
break;
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
{
char *provider_name = NULL, *ctx_name = NULL;
{
assert(ctx);
- if (ctx->ctx.ctx == LTTNG_UST_CONTEXT_APP_CONTEXT) {
+ if (ctx->ctx.ctx == LTTNG_UST_ABI_CONTEXT_APP_CONTEXT) {
free(ctx->ctx.u.app_ctx.provider_name);
free(ctx->ctx.u.app_ctx.ctx_name);
}
struct ltt_ust_ht_key {
const char *name;
const struct lttng_bytecode *filter;
- enum lttng_ust_loglevel_type loglevel_type;
+ enum lttng_ust_abi_loglevel_type loglevel_type;
int loglevel_value;
const struct lttng_event_exclusion *exclusion;
};
/* UST event */
struct ltt_ust_event {
unsigned int enabled;
- struct lttng_ust_event attr;
+ struct lttng_ust_abi_event attr;
struct lttng_ht_node_str node;
char *filter_expression;
struct lttng_bytecode *filter;
* Log4j, Python.
*/
enum lttng_domain_type domain;
- char name[LTTNG_UST_SYM_NAME_LEN];
- struct lttng_ust_channel_attr attr;
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
+ struct lttng_ust_abi_channel_attr attr;
struct lttng_ht *ctx;
struct cds_list_head ctx_list;
struct lttng_ht *events;
unsigned int live_timer_interval; /* usec */
/* Metadata channel attributes. */
- struct lttng_ust_channel_attr metadata_attr;
+ struct lttng_ust_abi_channel_attr metadata_attr;
/*
* Path where to keep the shared memory files.
*/
struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
char *name, struct lttng_bytecode *filter,
- enum lttng_ust_loglevel_type loglevel_type, int loglevel_value,
+ enum lttng_ust_abi_loglevel_type loglevel_type, int loglevel_value,
struct lttng_event_exclusion *exclusion);
struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
const char *name);
static inline
struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
char *name, struct lttng_bytecode *filter,
- enum lttng_ust_loglevel_type loglevel_type, int loglevel_value,
+ enum lttng_ust_abi_loglevel_type loglevel_type, int loglevel_value,
struct lttng_event_exclusion *exclusion)
{
return NULL;
#define __ust_stringify(x) __ust_stringify1(x)
#endif /* __ust_stringify */
-#define LTTNG_UST_SYM_NAME_LEN 256
+#define LTTNG_UST_ABI_SYM_NAME_LEN 256
#define LTTNG_UST_ABI_PROCNAME_LEN 16
/* UST comm magic number, used to validate protocol and endianness. */
-#define LTTNG_UST_COMM_MAGIC 0xC57C57C5
+#define LTTNG_UST_ABI_COMM_MAGIC 0xC57C57C5
/* Version for ABI between liblttng-ust, sessiond, consumerd */
-#define LTTNG_UST_ABI_MAJOR_VERSION 8
-#define LTTNG_UST_ABI_MINOR_VERSION 1
-
-enum lttng_ust_instrumentation {
- LTTNG_UST_TRACEPOINT = 0,
- LTTNG_UST_PROBE = 1,
- LTTNG_UST_FUNCTION = 2,
+#define LTTNG_UST_ABI_MAJOR_VERSION 9
+#define LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE 8
+#define LTTNG_UST_ABI_MINOR_VERSION 0
+
+enum lttng_ust_abi_instrumentation {
+ LTTNG_UST_ABI_TRACEPOINT = 0,
+ LTTNG_UST_ABI_PROBE = 1,
+ LTTNG_UST_ABI_FUNCTION = 2,
};
-enum lttng_ust_loglevel_type {
- LTTNG_UST_LOGLEVEL_ALL = 0,
- LTTNG_UST_LOGLEVEL_RANGE = 1,
- LTTNG_UST_LOGLEVEL_SINGLE = 2,
+enum lttng_ust_abi_loglevel_type {
+ LTTNG_UST_ABI_LOGLEVEL_ALL = 0,
+ LTTNG_UST_ABI_LOGLEVEL_RANGE = 1,
+ LTTNG_UST_ABI_LOGLEVEL_SINGLE = 2,
};
-enum lttng_ust_output {
- LTTNG_UST_MMAP = 0,
+enum lttng_ust_abi_output {
+ LTTNG_UST_ABI_MMAP = 0,
};
-enum lttng_ust_chan_type {
- LTTNG_UST_CHAN_PER_CPU = 0,
- LTTNG_UST_CHAN_METADATA = 1,
+enum lttng_ust_abi_chan_type {
+ LTTNG_UST_ABI_CHAN_PER_CPU = 0,
+ LTTNG_UST_ABI_CHAN_METADATA = 1,
};
-struct lttng_ust_tracer_version {
+struct lttng_ust_abi_tracer_version {
uint32_t major;
uint32_t minor;
uint32_t patchlevel;
} LTTNG_PACKED;
-#define LTTNG_UST_CHANNEL_PADDING (LTTNG_UST_SYM_NAME_LEN + 32)
+#define LTTNG_UST_ABI_CHANNEL_PADDING (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
/*
* Given that the consumerd is limited to 64k file descriptors, we
* cannot expect much more than 1MB channel structure size. This size is
* depends on the number of streams within a channel, which depends on
* the number of possible CPUs on the system.
*/
-#define LTTNG_UST_CHANNEL_DATA_MAX_LEN 1048576U
-struct lttng_ust_channel {
+#define LTTNG_UST_ABI_CHANNEL_DATA_MAX_LEN 1048576U
+struct lttng_ust_abi_channel {
uint64_t len;
- enum lttng_ust_chan_type type;
- char padding[LTTNG_UST_CHANNEL_PADDING];
+ int32_t type; /* enum lttng_ust_abi_chan_type */
+ char padding[LTTNG_UST_ABI_CHANNEL_PADDING];
char data[]; /* variable sized data */
} LTTNG_PACKED;
-#define LTTNG_UST_STREAM_PADDING1 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_stream {
+#define LTTNG_UST_ABI_STREAM_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_stream {
uint64_t len; /* shm len */
uint32_t stream_nr; /* stream number */
- char padding[LTTNG_UST_STREAM_PADDING1];
+ char padding[LTTNG_UST_ABI_STREAM_PADDING1];
/*
* shm_fd and wakeup_fd are send over unix socket as file
* descriptors after this structure.
*/
} LTTNG_PACKED;
-#define LTTNG_UST_EVENT_PADDING1 16
-#define LTTNG_UST_EVENT_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_event {
- enum lttng_ust_instrumentation instrumentation;
- char name[LTTNG_UST_SYM_NAME_LEN]; /* event name */
+#define LTTNG_UST_ABI_COUNTER_DIMENSION_MAX 4
+
+enum lttng_ust_abi_counter_arithmetic {
+ LTTNG_UST_ABI_COUNTER_ARITHMETIC_MODULAR = 0,
+ LTTNG_UST_ABI_COUNTER_ARITHMETIC_SATURATION = 1,
+};
+
+enum lttng_ust_abi_counter_bitness {
+ LTTNG_UST_ABI_COUNTER_BITNESS_32 = 0,
+ LTTNG_UST_ABI_COUNTER_BITNESS_64 = 1,
+};
+
+struct lttng_ust_abi_counter_dimension {
+ uint64_t size;
+ uint64_t underflow_index;
+ uint64_t overflow_index;
+ uint8_t has_underflow;
+ uint8_t has_overflow;
+} LTTNG_PACKED;
+
+#define LTTNG_UST_ABI_COUNTER_CONF_PADDING1 67
+struct lttng_ust_abi_counter_conf {
+ uint32_t arithmetic; /* enum lttng_ust_counter_arithmetic */
+ uint32_t bitness; /* enum lttng_ust_counter_bitness */
+ uint32_t number_dimensions;
+ int64_t global_sum_step;
+ struct lttng_ust_abi_counter_dimension dimensions[LTTNG_UST_ABI_COUNTER_DIMENSION_MAX];
+ uint8_t coalesce_hits;
+ char padding[LTTNG_UST_ABI_COUNTER_CONF_PADDING1];
+} LTTNG_PACKED;
+
+struct lttng_ust_abi_counter_value {
+ uint32_t number_dimensions;
+ uint64_t dimension_indexes[LTTNG_UST_ABI_COUNTER_DIMENSION_MAX];
+ int64_t value;
+} LTTNG_PACKED;
+
+#define LTTNG_UST_ABI_EVENT_PADDING1 8
+#define LTTNG_UST_ABI_EVENT_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_event {
+ int32_t instrumentation; /* enum lttng_ust_abi_instrumentation */
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN]; /* event name */
- enum lttng_ust_loglevel_type loglevel_type;
- int loglevel; /* value, -1: all */
- char padding[LTTNG_UST_EVENT_PADDING1];
+ int32_t loglevel_type; /* enum lttng_ust_abi_loglevel_type */
+ int32_t loglevel; /* value, -1: all */
+ uint64_t token; /* User-provided token */
+ char padding[LTTNG_UST_ABI_EVENT_PADDING1];
/* Per instrumentation type configuration */
union {
- char padding[LTTNG_UST_EVENT_PADDING2];
+ char padding[LTTNG_UST_ABI_EVENT_PADDING2];
} u;
} LTTNG_PACKED;
-#define LTTNG_UST_EVENT_NOTIFIER_PADDING 40
-struct lttng_ust_event_notifier {
- struct lttng_ust_event event;
- char padding[LTTNG_UST_EVENT_NOTIFIER_PADDING];
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_PADDING 32
+struct lttng_ust_abi_event_notifier {
+ struct lttng_ust_abi_event event;
+ uint64_t error_counter_index;
+ char padding[LTTNG_UST_ABI_EVENT_NOTIFIER_PADDING];
} LTTNG_PACKED;
-#define LTTNG_UST_EVENT_NOTIFIER_NOTIFICATION_PADDING 34
-struct lttng_ust_event_notifier_notification {
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING 32
+struct lttng_ust_abi_event_notifier_notification {
uint64_t token;
- char padding[LTTNG_UST_EVENT_NOTIFIER_NOTIFICATION_PADDING];
+ uint16_t capture_buf_size;
+ char padding[LTTNG_UST_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING];
} LTTNG_PACKED;
-enum lttng_ust_field_type {
- LTTNG_UST_FIELD_OTHER = 0,
- LTTNG_UST_FIELD_INTEGER = 1,
- LTTNG_UST_FIELD_ENUM = 2,
- LTTNG_UST_FIELD_FLOAT = 3,
- LTTNG_UST_FIELD_STRING = 4,
+#define LTTNG_UST_ABI_COUNTER_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+#define LTTNG_UST_ABI_COUNTER_DATA_MAX_LEN 4096U
+struct lttng_ust_abi_counter {
+ uint64_t len;
+ char padding[LTTNG_UST_ABI_COUNTER_PADDING1];
+ char data[]; /* variable sized data */
+} LTTNG_PACKED;
+
+#define LTTNG_UST_ABI_COUNTER_GLOBAL_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_counter_global {
+ uint64_t len; /* shm len */
+ char padding[LTTNG_UST_ABI_COUNTER_GLOBAL_PADDING1];
+} LTTNG_PACKED;
+
+#define LTTNG_UST_ABI_COUNTER_CPU_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_counter_cpu {
+ uint64_t len; /* shm len */
+ uint32_t cpu_nr;
+ char padding[LTTNG_UST_ABI_COUNTER_CPU_PADDING1];
+} LTTNG_PACKED;
+
+enum lttng_ust_abi_field_type {
+ LTTNG_UST_ABI_FIELD_OTHER = 0,
+ LTTNG_UST_ABI_FIELD_INTEGER = 1,
+ LTTNG_UST_ABI_FIELD_ENUM = 2,
+ LTTNG_UST_ABI_FIELD_FLOAT = 3,
+ LTTNG_UST_ABI_FIELD_STRING = 4,
};
-#define LTTNG_UST_FIELD_ITER_PADDING (LTTNG_UST_SYM_NAME_LEN + 28)
-struct lttng_ust_field_iter {
- char event_name[LTTNG_UST_SYM_NAME_LEN];
- char field_name[LTTNG_UST_SYM_NAME_LEN];
- enum lttng_ust_field_type type;
+#define LTTNG_UST_ABI_FIELD_ITER_PADDING (LTTNG_UST_ABI_SYM_NAME_LEN + 28)
+struct lttng_ust_abi_field_iter {
+ char event_name[LTTNG_UST_ABI_SYM_NAME_LEN];
+ char field_name[LTTNG_UST_ABI_SYM_NAME_LEN];
+ int32_t type; /* enum lttng_ust_abi_field_type */
int loglevel; /* event loglevel */
int nowrite;
- char padding[LTTNG_UST_FIELD_ITER_PADDING];
+ char padding[LTTNG_UST_ABI_FIELD_ITER_PADDING];
} LTTNG_PACKED;
-enum lttng_ust_context_type {
- LTTNG_UST_CONTEXT_VTID = 0,
- LTTNG_UST_CONTEXT_VPID = 1,
- LTTNG_UST_CONTEXT_PTHREAD_ID = 2,
- LTTNG_UST_CONTEXT_PROCNAME = 3,
- LTTNG_UST_CONTEXT_IP = 4,
- LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER = 5,
- LTTNG_UST_CONTEXT_CPU_ID = 6,
- LTTNG_UST_CONTEXT_APP_CONTEXT = 7,
- LTTNG_UST_CONTEXT_CGROUP_NS = 8,
- LTTNG_UST_CONTEXT_IPC_NS = 9,
- LTTNG_UST_CONTEXT_MNT_NS = 10,
- LTTNG_UST_CONTEXT_NET_NS = 11,
- LTTNG_UST_CONTEXT_PID_NS = 12,
- LTTNG_UST_CONTEXT_USER_NS = 13,
- LTTNG_UST_CONTEXT_UTS_NS = 14,
- LTTNG_UST_CONTEXT_VUID = 15,
- LTTNG_UST_CONTEXT_VEUID = 16,
- LTTNG_UST_CONTEXT_VSUID = 17,
- LTTNG_UST_CONTEXT_VGID = 18,
- LTTNG_UST_CONTEXT_VEGID = 19,
- LTTNG_UST_CONTEXT_VSGID = 20,
- LTTNG_UST_CONTEXT_TIME_NS = 21,
+enum lttng_ust_abi_context_type {
+ LTTNG_UST_ABI_CONTEXT_VTID = 0,
+ LTTNG_UST_ABI_CONTEXT_VPID = 1,
+ LTTNG_UST_ABI_CONTEXT_PTHREAD_ID = 2,
+ LTTNG_UST_ABI_CONTEXT_PROCNAME = 3,
+ LTTNG_UST_ABI_CONTEXT_IP = 4,
+ LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER = 5,
+ LTTNG_UST_ABI_CONTEXT_CPU_ID = 6,
+ LTTNG_UST_ABI_CONTEXT_APP_CONTEXT = 7,
+ LTTNG_UST_ABI_CONTEXT_CGROUP_NS = 8,
+ LTTNG_UST_ABI_CONTEXT_IPC_NS = 9,
+ LTTNG_UST_ABI_CONTEXT_MNT_NS = 10,
+ LTTNG_UST_ABI_CONTEXT_NET_NS = 11,
+ LTTNG_UST_ABI_CONTEXT_PID_NS = 12,
+ LTTNG_UST_ABI_CONTEXT_USER_NS = 13,
+ LTTNG_UST_ABI_CONTEXT_UTS_NS = 14,
+ LTTNG_UST_ABI_CONTEXT_VUID = 15,
+ LTTNG_UST_ABI_CONTEXT_VEUID = 16,
+ LTTNG_UST_ABI_CONTEXT_VSUID = 17,
+ LTTNG_UST_ABI_CONTEXT_VGID = 18,
+ LTTNG_UST_ABI_CONTEXT_VEGID = 19,
+ LTTNG_UST_ABI_CONTEXT_VSGID = 20,
+ LTTNG_UST_ABI_CONTEXT_TIME_NS = 21,
};
-struct lttng_ust_perf_counter_ctx {
+struct lttng_ust_abi_perf_counter_ctx {
uint32_t type;
uint64_t config;
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
} LTTNG_PACKED;
-#define LTTNG_UST_CONTEXT_PADDING1 16
-#define LTTNG_UST_CONTEXT_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_context {
- enum lttng_ust_context_type ctx;
- char padding[LTTNG_UST_CONTEXT_PADDING1];
+#define LTTNG_UST_ABI_CONTEXT_PADDING1 16
+#define LTTNG_UST_ABI_CONTEXT_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_context {
+ int32_t ctx; /* enum lttng_ust_abi_context_type */
+ char padding[LTTNG_UST_ABI_CONTEXT_PADDING1];
union {
- struct lttng_ust_perf_counter_ctx perf_counter;
+ struct lttng_ust_abi_perf_counter_ctx perf_counter;
struct {
/* Includes trailing '\0'. */
uint32_t provider_name_len;
uint32_t ctx_name_len;
} app_ctx;
- char padding[LTTNG_UST_CONTEXT_PADDING2];
+ char padding[LTTNG_UST_ABI_CONTEXT_PADDING2];
} u;
} LTTNG_PACKED;
/*
* Tracer channel attributes.
*/
-#define LTTNG_UST_CHANNEL_ATTR_PADDING (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_channel_attr {
+#define LTTNG_UST_ABI_CHANNEL_ATTR_PADDING (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_channel_attr {
uint64_t subbuf_size; /* bytes */
uint64_t num_subbuf; /* power of 2 */
int overwrite; /* 1: overwrite, 0: discard */
unsigned int switch_timer_interval; /* usec */
unsigned int read_timer_interval; /* usec */
- enum lttng_ust_output output; /* splice, mmap */
+ int32_t output; /* enum lttng_ust_abi_output */
union {
struct {
int64_t blocking_timeout; /* Blocking timeout (usec) */
} s;
- char padding[LTTNG_UST_CHANNEL_ATTR_PADDING];
+ char padding[LTTNG_UST_ABI_CHANNEL_ATTR_PADDING];
} u;
} LTTNG_PACKED;
-#define LTTNG_UST_TRACEPOINT_ITER_PADDING 16
-struct lttng_ust_tracepoint_iter {
- char name[LTTNG_UST_SYM_NAME_LEN]; /* provider:name */
+#define LTTNG_UST_ABI_TRACEPOINT_ITER_PADDING 16
+struct lttng_ust_abi_tracepoint_iter {
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN]; /* provider:name */
int loglevel;
- char padding[LTTNG_UST_TRACEPOINT_ITER_PADDING];
+ char padding[LTTNG_UST_ABI_TRACEPOINT_ITER_PADDING];
} LTTNG_PACKED;
-enum lttng_ust_object_type {
- LTTNG_UST_OBJECT_TYPE_UNKNOWN = -1,
- LTTNG_UST_OBJECT_TYPE_CHANNEL = 0,
- LTTNG_UST_OBJECT_TYPE_STREAM = 1,
- LTTNG_UST_OBJECT_TYPE_EVENT = 2,
- LTTNG_UST_OBJECT_TYPE_CONTEXT = 3,
+enum lttng_ust_abi_object_type {
+ LTTNG_UST_ABI_OBJECT_TYPE_UNKNOWN = -1,
+ LTTNG_UST_ABI_OBJECT_TYPE_CHANNEL = 0,
+ LTTNG_UST_ABI_OBJECT_TYPE_STREAM = 1,
+ LTTNG_UST_ABI_OBJECT_TYPE_EVENT = 2,
+ LTTNG_UST_ABI_OBJECT_TYPE_CONTEXT = 3,
+ LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER_GROUP = 4,
+ LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER = 5,
+ LTTNG_UST_ABI_OBJECT_TYPE_COUNTER = 6,
+ LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_GLOBAL = 7,
+ LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_CPU = 8,
};
-#define LTTNG_UST_OBJECT_DATA_PADDING1 32
-#define LTTNG_UST_OBJECT_DATA_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
+#define LTTNG_UST_ABI_OBJECT_DATA_PADDING1 32
+#define LTTNG_UST_ABI_OBJECT_DATA_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
-struct lttng_ust_object_data {
- enum lttng_ust_object_type type;
+struct lttng_ust_abi_object_data {
+ int32_t type; /* enum lttng_ust_abi_object_type */
int handle;
uint64_t size;
- char padding1[LTTNG_UST_OBJECT_DATA_PADDING1];
+ char padding1[LTTNG_UST_ABI_OBJECT_DATA_PADDING1];
union {
struct {
void *data;
- enum lttng_ust_chan_type type;
+ int32_t type; /* enum lttng_ust_abi_chan_type */
int wakeup_fd;
} channel;
struct {
int wakeup_fd;
uint32_t stream_nr;
} stream;
- char padding2[LTTNG_UST_OBJECT_DATA_PADDING2];
+ struct {
+ void *data;
+ } counter;
+ struct {
+ int shm_fd;
+ } counter_global;
+ struct {
+ int shm_fd;
+ uint32_t cpu_nr;
+ } counter_cpu;
+ char padding2[LTTNG_UST_ABI_OBJECT_DATA_PADDING2];
} u;
} LTTNG_PACKED;
enum lttng_ust_calibrate_type {
- LTTNG_UST_CALIBRATE_TRACEPOINT,
+ LTTNG_UST_ABI_CALIBRATE_TRACEPOINT,
};
-#define LTTNG_UST_CALIBRATE_PADDING1 16
-#define LTTNG_UST_CALIBRATE_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_calibrate {
+#define LTTNG_UST_ABI_CALIBRATE_PADDING1 16
+#define LTTNG_UST_ABI_CALIBRATE_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_calibrate {
enum lttng_ust_calibrate_type type; /* type (input) */
- char padding[LTTNG_UST_CALIBRATE_PADDING1];
+ char padding[LTTNG_UST_ABI_CALIBRATE_PADDING1];
union {
- char padding[LTTNG_UST_CALIBRATE_PADDING2];
+ char padding[LTTNG_UST_ABI_CALIBRATE_PADDING2];
} u;
} LTTNG_PACKED;
-#define FILTER_BYTECODE_MAX_LEN 65536
-#define LTTNG_UST_FILTER_PADDING 32
-struct lttng_ust_filter_bytecode {
+#define LTTNG_UST_ABI_FILTER_BYTECODE_MAX_LEN 65536
+#define LTTNG_UST_ABI_FILTER_PADDING 32
+struct lttng_ust_abi_filter_bytecode {
uint32_t len;
uint32_t reloc_offset;
uint64_t seqnum;
- char padding[LTTNG_UST_FILTER_PADDING];
+ char padding[LTTNG_UST_ABI_FILTER_PADDING];
char data[0];
} LTTNG_PACKED;
-#define CAPTURE_BYTECODE_MAX_LEN 65536
-#define LTTNG_UST_CAPTURE_PADDING 32
-struct lttng_ust_capture_bytecode {
+#define LTTNG_UST_ABI_CAPTURE_BYTECODE_MAX_LEN 65536
+#define LTTNG_UST_ABI_CAPTURE_PADDING 32
+struct lttng_ust_abi_capture_bytecode {
uint32_t len;
uint32_t reloc_offset;
uint64_t seqnum;
- char padding[LTTNG_UST_CAPTURE_PADDING];
+ char padding[LTTNG_UST_ABI_CAPTURE_PADDING];
char data[0];
} LTTNG_PACKED;
-#define LTTNG_UST_EXCLUSION_PADDING 32
-struct lttng_ust_event_exclusion {
+#define LTTNG_UST_ABI_EXCLUSION_PADDING 32
+struct lttng_ust_abi_event_exclusion {
uint32_t count;
- char padding[LTTNG_UST_EXCLUSION_PADDING];
- char names[LTTNG_UST_SYM_NAME_LEN][0];
+ char padding[LTTNG_UST_ABI_EXCLUSION_PADDING];
+ char names[LTTNG_UST_ABI_SYM_NAME_LEN][0];
} LTTNG_PACKED;
-#define _UST_CMD(minor) (minor)
-#define _UST_CMDR(minor, type) (minor)
-#define _UST_CMDW(minor, type) (minor)
+#define LTTNG_UST_ABI_CMD(minor) (minor)
+#define LTTNG_UST_ABI_CMDR(minor, type) (minor)
+#define LTTNG_UST_ABI_CMDW(minor, type) (minor)
/* Handled by object descriptor */
-#define LTTNG_UST_RELEASE _UST_CMD(0x1)
+#define LTTNG_UST_ABI_RELEASE LTTNG_UST_ABI_CMD(0x1)
/* Handled by object cmd */
/* LTTng-UST commands */
-#define LTTNG_UST_SESSION _UST_CMD(0x40)
-#define LTTNG_UST_TRACER_VERSION \
- _UST_CMDR(0x41, struct lttng_ust_tracer_version)
-#define LTTNG_UST_TRACEPOINT_LIST _UST_CMD(0x42)
-#define LTTNG_UST_WAIT_QUIESCENT _UST_CMD(0x43)
-#define LTTNG_UST_REGISTER_DONE _UST_CMD(0x44)
-#define LTTNG_UST_TRACEPOINT_FIELD_LIST _UST_CMD(0x45)
-#define LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE _UST_CMD(0x46)
-
-/* Session FD commands */
-#define LTTNG_UST_CHANNEL \
- _UST_CMDW(0x51, struct lttng_ust_channel)
-#define LTTNG_UST_SESSION_START _UST_CMD(0x52)
-#define LTTNG_UST_SESSION_STOP _UST_CMD(0x53)
-#define LTTNG_UST_SESSION_STATEDUMP _UST_CMD(0x54)
-
-/* Channel FD commands */
-#define LTTNG_UST_STREAM _UST_CMD(0x60)
-#define LTTNG_UST_EVENT \
- _UST_CMDW(0x61, struct lttng_ust_event)
-
-/* Event and Channel FD commands */
-#define LTTNG_UST_CONTEXT \
- _UST_CMDW(0x70, struct lttng_ust_context)
-#define LTTNG_UST_FLUSH_BUFFER \
- _UST_CMD(0x71)
-
-/* Event, Channel and Session commands */
-#define LTTNG_UST_ENABLE _UST_CMD(0x80)
-#define LTTNG_UST_DISABLE _UST_CMD(0x81)
+#define LTTNG_UST_ABI_SESSION LTTNG_UST_ABI_CMD(0x40)
+#define LTTNG_UST_ABI_TRACER_VERSION \
+ LTTNG_UST_ABI_CMDR(0x41, struct lttng_ust_abi_tracer_version)
+#define LTTNG_UST_ABI_TRACEPOINT_LIST LTTNG_UST_ABI_CMD(0x42)
+#define LTTNG_UST_ABI_WAIT_QUIESCENT LTTNG_UST_ABI_CMD(0x43)
+#define LTTNG_UST_ABI_REGISTER_DONE LTTNG_UST_ABI_CMD(0x44)
+#define LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST LTTNG_UST_ABI_CMD(0x45)
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_GROUP_CREATE \
+ LTTNG_UST_ABI_CMD(0x46)
+
+/* Session commands */
+#define LTTNG_UST_ABI_CHANNEL \
+ LTTNG_UST_ABI_CMDW(0x51, struct lttng_ust_abi_channel)
+#define LTTNG_UST_ABI_SESSION_START LTTNG_UST_ABI_CMD(0x52)
+#define LTTNG_UST_ABI_SESSION_STOP LTTNG_UST_ABI_CMD(0x53)
+#define LTTNG_UST_ABI_SESSION_STATEDUMP LTTNG_UST_ABI_CMD(0x54)
+
+/* Channel commands */
+#define LTTNG_UST_ABI_STREAM LTTNG_UST_ABI_CMD(0x60)
+#define LTTNG_UST_ABI_EVENT \
+ LTTNG_UST_ABI_CMDW(0x61, struct lttng_ust_abi_event)
+
+/* Event and channel commands */
+#define LTTNG_UST_ABI_CONTEXT \
+ LTTNG_UST_ABI_CMDW(0x70, struct lttng_ust_abi_context)
+#define LTTNG_UST_ABI_FLUSH_BUFFER \
+ LTTNG_UST_ABI_CMD(0x71)
+
+/* Event, event notifier, channel and session commands */
+#define LTTNG_UST_ABI_ENABLE LTTNG_UST_ABI_CMD(0x80)
+#define LTTNG_UST_ABI_DISABLE LTTNG_UST_ABI_CMD(0x81)
/* Tracepoint list commands */
-#define LTTNG_UST_TRACEPOINT_LIST_GET _UST_CMD(0x90)
-#define LTTNG_UST_TRACEPOINT_FIELD_LIST_GET _UST_CMD(0x91)
+#define LTTNG_UST_ABI_TRACEPOINT_LIST_GET LTTNG_UST_ABI_CMD(0x90)
+#define LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST_GET LTTNG_UST_ABI_CMD(0x91)
-/* Event FD commands */
-#define LTTNG_UST_FILTER _UST_CMD(0xA0)
-#define LTTNG_UST_EXCLUSION _UST_CMD(0xA1)
+/* Event and event notifier commands */
+#define LTTNG_UST_ABI_FILTER LTTNG_UST_ABI_CMD(0xA0)
+#define LTTNG_UST_ABI_EXCLUSION LTTNG_UST_ABI_CMD(0xA1)
/* Event notifier group commands */
-#define LTTNG_UST_EVENT_NOTIFIER_CREATE \
- _UST_CMDW(0xB0, struct lttng_ust_event_notifier)
-
-#define LTTNG_UST_ROOT_HANDLE 0
-
-struct lttng_ust_obj;
-
-union ust_args {
- struct {
- void *chan_data;
- int wakeup_fd;
- } channel;
- struct {
- int shm_fd;
- int wakeup_fd;
- } stream;
- struct {
- struct lttng_ust_field_iter entry;
- } field_list;
- struct {
- char *ctxname;
- } app_context;
-};
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_CREATE \
+ LTTNG_UST_ABI_CMDW(0xB0, struct lttng_ust_abi_event_notifier)
-struct lttng_ust_objd_ops {
- long (*cmd)(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *args, void *owner);
- int (*release)(int objd);
-};
+/* Event notifier commands */
+#define LTTNG_UST_ABI_CAPTURE LTTNG_UST_ABI_CMD(0xB6)
-/* Create root handle. Always ID 0. */
-int lttng_abi_create_root_handle(void);
+/* Session and event notifier group commands */
+#define LTTNG_UST_ABI_COUNTER \
+ LTTNG_UST_ABI_CMDW(0xC0, struct lttng_ust_abi_counter)
-const struct lttng_ust_objd_ops *objd_ops(int id);
-int lttng_ust_objd_unref(int id, int is_owner);
+/* Counter commands */
+#define LTTNG_UST_ABI_COUNTER_GLOBAL \
+ LTTNG_UST_ABI_CMDW(0xD0, struct lttng_ust_abi_counter_global)
+#define LTTNG_UST_ABI_COUNTER_CPU \
+ LTTNG_UST_ABI_CMDW(0xD1, struct lttng_ust_abi_counter_cpu)
-void lttng_ust_abi_exit(void);
-void lttng_ust_events_exit(void);
-void lttng_ust_objd_table_owner_cleanup(void *owner);
+#define LTTNG_UST_ABI_ROOT_HANDLE 0
#endif /* LTTNG_UST_ABI_INTERNAL_H */
static void copy_channel_attr_to_ustctl(
struct ustctl_consumer_channel_attr *attr,
- struct lttng_ust_channel_attr *uattr)
+ struct lttng_ust_abi_channel_attr *uattr)
{
/* Copy event attributes since the layout is different. */
attr->subbuf_size = uattr->subbuf_size;
/* Event loglevel. */
if (ev_loglevel_value != key->loglevel_type) {
- if (event->attr.loglevel_type == LTTNG_UST_LOGLEVEL_ALL
+ if (event->attr.loglevel_type == LTTNG_UST_ABI_LOGLEVEL_ALL
&& key->loglevel_type == 0 &&
ev_loglevel_value == -1) {
/*
/* Both exclusions exists, check count followed by the names. */
if (event->exclusion->count != key->exclusion->count ||
memcmp(event->exclusion->names, key->exclusion->names,
- event->exclusion->count * LTTNG_UST_SYM_NAME_LEN) != 0) {
+ event->exclusion->count * LTTNG_UST_ABI_SYM_NAME_LEN) != 0) {
goto no_match;
}
}
struct ltt_session *session;
struct ltt_ust_channel *uchan;
- if (ua_chan->attr.type != LTTNG_UST_CHAN_PER_CPU) {
+ if (ua_chan->attr.type != LTTNG_UST_ABI_CHAN_PER_CPU) {
return;
}
return ret;
}
-int ust_app_release_object(struct ust_app *app, struct lttng_ust_object_data *data)
+int ust_app_release_object(struct ust_app *app, struct lttng_ust_abi_object_data *data)
{
int ret, sock;
ua_sess->handle = -1;
ua_sess->channels = lttng_ht_new(0, LTTNG_HT_TYPE_STRING);
- ua_sess->metadata_attr.type = LTTNG_UST_CHAN_METADATA;
+ ua_sess->metadata_attr.type = LTTNG_UST_ABI_CHAN_METADATA;
pthread_mutex_init(&ua_sess->lock, NULL);
return ua_sess;
static
struct ust_app_channel *alloc_ust_app_channel(const char *name,
struct ust_app_session *ua_sess,
- struct lttng_ust_channel_attr *attr)
+ struct lttng_ust_abi_channel_attr *attr)
{
struct ust_app_channel *ua_chan;
ua_chan->attr.blocking_timeout = attr->u.s.blocking_timeout;
}
/* By default, the channel is a per cpu channel. */
- ua_chan->attr.type = LTTNG_UST_CHAN_PER_CPU;
+ ua_chan->attr.type = LTTNG_UST_ABI_CHAN_PER_CPU;
DBG3("UST app channel %s allocated", ua_chan->name);
*/
static
struct ust_app_event *alloc_ust_app_event(char *name,
- struct lttng_ust_event *attr)
+ struct lttng_ust_abi_event *attr)
{
struct ust_app_event *ua_event;
if (uctx) {
memcpy(&ua_ctx->ctx, uctx, sizeof(ua_ctx->ctx));
- if (uctx->ctx == LTTNG_UST_CONTEXT_APP_CONTEXT) {
+ if (uctx->ctx == LTTNG_UST_ABI_CONTEXT_APP_CONTEXT) {
char *provider_name = NULL, *ctx_name = NULL;
provider_name = strdup(uctx->u.app_ctx.provider_name);
*
* Return allocated filter or NULL on error.
*/
-static struct lttng_ust_filter_bytecode *
-create_ust_filter_bytecode_from_bytecode(const struct lttng_bytecode *orig_f)
+static struct lttng_ust_abi_filter_bytecode *create_ust_filter_bytecode_from_bytecode(
+ const struct lttng_bytecode *orig_f)
{
- struct lttng_ust_filter_bytecode *filter = NULL;
+ struct lttng_ust_abi_filter_bytecode *filter = NULL;
/* Copy filter bytecode. */
filter = zmalloc(sizeof(*filter) + orig_f->len);
}
assert(sizeof(struct lttng_bytecode) ==
- sizeof(struct lttng_ust_filter_bytecode));
+ sizeof(struct lttng_ust_abi_filter_bytecode));
memcpy(filter, orig_f, sizeof(*filter) + orig_f->len);
error:
return filter;
*
* Return allocated filter or NULL on error.
*/
-static struct lttng_ust_capture_bytecode *
+static struct lttng_ust_abi_capture_bytecode *
create_ust_capture_bytecode_from_bytecode(const struct lttng_bytecode *orig_f)
{
- struct lttng_ust_capture_bytecode *capture = NULL;
+ struct lttng_ust_abi_capture_bytecode *capture = NULL;
/* Copy capture bytecode. */
capture = zmalloc(sizeof(*capture) + orig_f->len);
if (!capture) {
- PERROR("Failed to allocate lttng_ust_capture_bytecode: bytecode len = %" PRIu32 " bytes", orig_f->len);
+ PERROR("Failed to allocate lttng_ust_abi_capture_bytecode: bytecode len = %" PRIu32 " bytes", orig_f->len);
goto error;
}
assert(sizeof(struct lttng_bytecode) ==
- sizeof(struct lttng_ust_capture_bytecode));
+ sizeof(struct lttng_ust_abi_capture_bytecode));
memcpy(capture, orig_f, sizeof(*capture) + orig_f->len);
error:
return capture;
*/
static int set_ust_object_filter(struct ust_app *app,
const struct lttng_bytecode *bytecode,
- struct lttng_ust_object_data *ust_object)
+ struct lttng_ust_abi_object_data *ust_object)
{
int ret;
- struct lttng_ust_filter_bytecode *ust_bytecode = NULL;
+ struct lttng_ust_abi_filter_bytecode *ust_bytecode = NULL;
health_code_update();
struct lttng_ust_object_data *ust_object)
{
int ret;
- struct lttng_ust_capture_bytecode *ust_bytecode = NULL;
+ struct lttng_ust_abi_capture_bytecode *ust_bytecode = NULL;
health_code_update();
}
static
-struct lttng_ust_event_exclusion *create_ust_exclusion_from_exclusion(
+struct lttng_ust_abi_event_exclusion *create_ust_exclusion_from_exclusion(
const struct lttng_event_exclusion *exclusion)
{
- struct lttng_ust_event_exclusion *ust_exclusion = NULL;
- size_t exclusion_alloc_size = sizeof(struct lttng_ust_event_exclusion) +
- LTTNG_UST_SYM_NAME_LEN * exclusion->count;
+ struct lttng_ust_abi_event_exclusion *ust_exclusion = NULL;
+ size_t exclusion_alloc_size = sizeof(struct lttng_ust_abi_event_exclusion) +
+ LTTNG_UST_ABI_SYM_NAME_LEN * exclusion->count;
ust_exclusion = zmalloc(exclusion_alloc_size);
if (!ust_exclusion) {
}
assert(sizeof(struct lttng_event_exclusion) ==
- sizeof(struct lttng_ust_event_exclusion));
+ sizeof(struct lttng_ust_abi_event_exclusion));
memcpy(ust_exclusion, exclusion, exclusion_alloc_size);
end:
return ust_exclusion;
*/
static int set_ust_object_exclusions(struct ust_app *app,
const struct lttng_event_exclusion *exclusions,
- struct lttng_ust_object_data *ust_object)
+ struct lttng_ust_abi_object_data *ust_object)
{
int ret;
- struct lttng_ust_event_exclusion *ust_exclusions = NULL;
+ struct lttng_ust_abi_event_exclusion *ust_exclusions = NULL;
assert(exclusions && exclusions->count > 0);
* Disable the specified event on to UST tracer for the UST session.
*/
static int disable_ust_object(struct ust_app *app,
- struct lttng_ust_object_data *object)
+ struct lttng_ust_abi_object_data *object)
{
int ret;
* Enable the specified event on to UST tracer for the UST session.
*/
static int enable_ust_object(
- struct ust_app *app, struct lttng_ust_object_data *ust_object)
+ struct ust_app *app, struct lttng_ust_abi_object_data *ust_object)
{
int ret;
static int init_ust_event_notifier_from_event_rule(
const struct lttng_event_rule *rule,
- struct lttng_ust_event_notifier *event_notifier)
+ struct lttng_ust_abi_event_notifier *event_notifier)
{
enum lttng_event_rule_status status;
enum lttng_loglevel_type loglevel_type;
- enum lttng_ust_loglevel_type ust_loglevel_type = LTTNG_UST_LOGLEVEL_ALL;
+ enum lttng_ust_abi_loglevel_type ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_ALL;
int loglevel = -1, ret = 0;
const char *pattern;
pattern = event_get_default_agent_ust_name(
lttng_event_rule_get_domain_type(rule));
loglevel = 0;
- ust_loglevel_type = LTTNG_UST_LOGLEVEL_ALL;
+ ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_ALL;
} else {
status = lttng_event_rule_tracepoint_get_pattern(
rule, &pattern);
switch (loglevel_type) {
case LTTNG_EVENT_LOGLEVEL_ALL:
- ust_loglevel_type = LTTNG_UST_LOGLEVEL_ALL;
+ ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_ALL;
break;
case LTTNG_EVENT_LOGLEVEL_RANGE:
- ust_loglevel_type = LTTNG_UST_LOGLEVEL_RANGE;
+ ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_RANGE;
break;
case LTTNG_EVENT_LOGLEVEL_SINGLE:
- ust_loglevel_type = LTTNG_UST_LOGLEVEL_SINGLE;
+ ust_loglevel_type = LTTNG_UST_ABI_LOGLEVEL_SINGLE;
break;
default:
/* Unknown log level specification type. */
}
}
- event_notifier->event.instrumentation = LTTNG_UST_TRACEPOINT;
+ event_notifier->event.instrumentation = LTTNG_UST_ABI_TRACEPOINT;
ret = lttng_strncpy(event_notifier->event.name, pattern,
- LTTNG_UST_SYM_NAME_LEN - 1);
+ LTTNG_UST_ABI_SYM_NAME_LEN - 1);
if (ret) {
ERR("Failed to copy event rule pattern to notifier: pattern = '%s' ",
pattern);
int ret = 0;
enum lttng_condition_status condition_status;
const struct lttng_condition *condition = NULL;
- struct lttng_ust_event_notifier event_notifier;
+ struct lttng_ust_abi_event_notifier event_notifier;
const struct lttng_event_rule *event_rule = NULL;
unsigned int capture_bytecode_count = 0, i;
enum lttng_condition_status cond_status;
/* Copy exclusion data */
if (uevent->exclusion) {
exclusion_alloc_size = sizeof(struct lttng_event_exclusion) +
- LTTNG_UST_SYM_NAME_LEN * uevent->exclusion->count;
+ LTTNG_UST_ABI_SYM_NAME_LEN * uevent->exclusion->count;
ua_event->exclusion = zmalloc(exclusion_alloc_size);
if (ua_event->exclusion == NULL) {
PERROR("malloc");
}
switch(key->ctx) {
- case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+ case LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER:
if (strncmp(key->u.perf_counter.name,
ctx->ctx.u.perf_counter.name,
sizeof(key->u.perf_counter.name))) {
goto no_match;
}
break;
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
if (strcmp(key->u.app_ctx.provider_name,
ctx->ctx.u.app_ctx.provider_name) ||
strcmp(key->u.app_ctx.ctx_name,
*/
static int ust_app_channel_allocate(struct ust_app_session *ua_sess,
struct ltt_ust_channel *uchan,
- enum lttng_ust_chan_type type, struct ltt_ust_session *usess,
+ enum lttng_ust_abi_chan_type type, struct ltt_ust_session *usess,
struct ust_app_channel **ua_chanp)
{
int ret = 0;
{
int ret;
int event_pipe_write_fd;
- struct lttng_ust_object_data *event_notifier_group = NULL;
+ struct lttng_ust_abi_object_data *event_notifier_group = NULL;
enum lttng_error_code lttng_ret;
assert(app);
rcu_read_lock();
cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
- struct lttng_ust_tracepoint_iter uiter;
+ struct lttng_ust_abi_tracepoint_iter uiter;
health_code_update();
nbmem = new_nbmem;
tmp_event = new_tmp_event;
}
- memcpy(tmp_event[count].name, uiter.name, LTTNG_UST_SYM_NAME_LEN);
+ memcpy(tmp_event[count].name, uiter.name, LTTNG_UST_ABI_SYM_NAME_LEN);
tmp_event[count].loglevel = uiter.loglevel;
- tmp_event[count].type = (enum lttng_event_type) LTTNG_UST_TRACEPOINT;
+ tmp_event[count].type = (enum lttng_event_type) LTTNG_UST_ABI_TRACEPOINT;
tmp_event[count].pid = app->pid;
tmp_event[count].enabled = -1;
count++;
rcu_read_lock();
cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
- struct lttng_ust_field_iter uiter;
+ struct lttng_ust_abi_field_iter uiter;
health_code_update();
tmp_event = new_tmp_event;
}
- memcpy(tmp_event[count].field_name, uiter.field_name, LTTNG_UST_SYM_NAME_LEN);
+ memcpy(tmp_event[count].field_name, uiter.field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
/* Mapping between these enums matches 1 to 1. */
tmp_event[count].type = (enum lttng_event_field_type) uiter.type;
tmp_event[count].nowrite = uiter.nowrite;
- memcpy(tmp_event[count].event.name, uiter.event_name, LTTNG_UST_SYM_NAME_LEN);
+ memcpy(tmp_event[count].event.name, uiter.event_name, LTTNG_UST_ABI_SYM_NAME_LEN);
tmp_event[count].event.loglevel = uiter.loglevel;
tmp_event[count].event.type = LTTNG_EVENT_TRACEPOINT;
tmp_event[count].event.pid = app->pid;
* configuration.
*/
ret = ust_app_channel_allocate(ua_sess, uchan,
- LTTNG_UST_CHAN_PER_CPU, usess,
+ LTTNG_UST_ABI_CHAN_PER_CPU, usess,
&ua_chan);
if (ret < 0) {
goto error;
case USTCTL_NOTIFY_CMD_EVENT:
{
int sobjd, cobjd, loglevel_value;
- char name[LTTNG_UST_SYM_NAME_LEN], *sig, *model_emf_uri;
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN], *sig, *model_emf_uri;
size_t nr_fields;
struct ustctl_field *fields;
case USTCTL_NOTIFY_CMD_ENUM:
{
int sobjd;
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
size_t nr_entries;
struct ustctl_enum_entry *entries;
struct ust_app_ht_key {
const char *name;
const struct lttng_bytecode *filter;
- enum lttng_ust_loglevel_type loglevel_type;
+ enum lttng_ust_abi_loglevel_type loglevel_type;
const struct lttng_event_exclusion *exclusion;
};
struct ust_app_ctx {
int handle;
struct lttng_ust_context_attr ctx;
- struct lttng_ust_object_data *obj;
+ struct lttng_ust_abi_object_data *obj;
struct lttng_ht_node_ulong node;
struct cds_list_head list;
};
struct ust_app_event {
int enabled;
int handle;
- struct lttng_ust_object_data *obj;
- struct lttng_ust_event attr;
- char name[LTTNG_UST_SYM_NAME_LEN];
+ struct lttng_ust_abi_object_data *obj;
+ struct lttng_ust_abi_event attr;
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
struct lttng_ht_node_str node;
struct lttng_bytecode *filter;
struct lttng_event_exclusion *exclusion;
struct ust_app_event_notifier_rule {
int enabled;
int handle;
- struct lttng_ust_object_data *obj;
+ struct lttng_ust_abi_object_data *obj;
/* Holds a strong reference. */
struct lttng_trigger *trigger;
/* Unique ID returned by the tracer to identify this event notifier. */
char pathname[PATH_MAX];
/* Format is %s_%d respectively channel name and CPU number. */
char name[DEFAULT_STREAM_NAME_LEN];
- struct lttng_ust_object_data *obj;
+ struct lttng_ust_abi_object_data *obj;
/* Using a list of streams to keep order. */
struct cds_list_head list;
};
uint64_t tracing_channel_id;
/* Number of stream that this channel is expected to receive. */
unsigned int expected_stream_count;
- char name[LTTNG_UST_SYM_NAME_LEN];
- struct lttng_ust_object_data *obj;
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
+ struct lttng_ust_abi_object_data *obj;
struct ustctl_consumer_channel_attr attr;
struct ust_app_stream_list streams;
/* Session pointer that owns this object. */
int compatible; /* If the lttng-ust tracer version does not match the
supported version of the session daemon, this flag is
set to 0 (NOT compatible) else 1. */
- struct lttng_ust_tracer_version version;
+ struct lttng_ust_abi_tracer_version version;
uint32_t v_major; /* Version major number */
uint32_t v_minor; /* Version minor number */
/* Extra for the NULL byte. */
* Handle to the lttng_ust object representing the event
* notifier group.
*/
- struct lttng_ust_object_data *object;
+ struct lttng_ust_abi_object_data *object;
struct lttng_pipe *event_pipe;
} event_notifier_group;
/*
enum lttng_error_code ust_app_create_channel_subdirectories(
const struct ltt_ust_session *session);
int ust_app_release_object(struct ust_app *app,
- struct lttng_ust_object_data *data);
+ struct lttng_ust_abi_object_data *data);
enum lttng_error_code ust_app_clear_session(struct ltt_session *session);
enum lttng_error_code ust_app_open_packets(struct ltt_session *session);
}
static inline
-int ust_app_release_object(struct ust_app *app, struct lttng_ust_object_data *data)
+int ust_app_release_object(struct ust_app *app, struct lttng_ust_abi_object_data *data)
{
return 0;
}
chan_reg_key = ua_chan->key;
}
- if (ua_chan->attr.type == LTTNG_UST_CHAN_METADATA) {
+ if (ua_chan->attr.type == LTTNG_UST_ABI_CHAN_METADATA) {
chan_id = -1U;
/*
* Metadata channels shm_path (buffers) are handled within
}
switch (ua_chan->attr.output) {
- case LTTNG_UST_MMAP:
+ case LTTNG_UST_ABI_MMAP:
default:
output = LTTNG_EVENT_MMAP;
break;
struct lttng_ust_lib_ring_buffer;
struct ustctl_consumer_channel_attr {
- enum lttng_ust_chan_type type;
+ enum lttng_ust_abi_chan_type type;
uint64_t subbuf_size; /* bytes */
uint64_t num_subbuf; /* power of 2 */
int overwrite; /* 1: overwrite, 0: discard */
unsigned int switch_timer_interval; /* usec */
unsigned int read_timer_interval; /* usec */
- enum lttng_ust_output output; /* splice, mmap */
+ enum lttng_ust_abi_output output; /* splice, mmap */
uint32_t chan_id; /* channel ID */
unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
int64_t blocking_timeout; /* Blocking timeout (usec) */
*/
struct lttng_ust_context_attr {
- enum lttng_ust_context_type ctx;
+ enum lttng_ust_abi_context_type ctx;
union {
- struct lttng_ust_perf_counter_ctx perf_counter;
+ struct lttng_ust_abi_perf_counter_ctx perf_counter;
struct {
char *provider_name;
char *ctx_name;
*/
int ustctl_register_done(int sock);
int ustctl_create_session(int sock);
-int ustctl_create_event(int sock, struct lttng_ust_event *ev,
- struct lttng_ust_object_data *channel_data,
- struct lttng_ust_object_data **event_data);
+int ustctl_create_event(int sock, struct lttng_ust_abi_event *ev,
+ struct lttng_ust_abi_object_data *channel_data,
+ struct lttng_ust_abi_object_data **event_data);
int ustctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
- struct lttng_ust_object_data *obj_data,
- struct lttng_ust_object_data **context_data);
-int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode,
- struct lttng_ust_object_data *obj_data);
-int ustctl_set_exclusion(int sock, struct lttng_ust_event_exclusion *exclusion,
- struct lttng_ust_object_data *obj_data);
-int ustctl_set_capture(int sock, struct lttng_ust_capture_bytecode *bytecode,
- struct lttng_ust_object_data *obj_data);
-
-int ustctl_enable(int sock, struct lttng_ust_object_data *object);
-int ustctl_disable(int sock, struct lttng_ust_object_data *object);
+ struct lttng_ust_abi_object_data *obj_data,
+ struct lttng_ust_abi_object_data **context_data);
+int ustctl_set_filter(int sock, struct lttng_ust_abi_filter_bytecode *bytecode,
+ struct lttng_ust_abi_object_data *obj_data);
+int ustctl_set_capture(int sock, struct lttng_ust_abi_capture_bytecode *bytecode,
+ struct lttng_ust_abi_object_data *obj_data);
+int ustctl_set_exclusion(int sock, struct lttng_ust_abi_event_exclusion *exclusion,
+ struct lttng_ust_abi_object_data *obj_data);
+
+int ustctl_enable(int sock, struct lttng_ust_abi_object_data *object);
+int ustctl_disable(int sock, struct lttng_ust_abi_object_data *object);
int ustctl_start_session(int sock, int handle);
int ustctl_stop_session(int sock, int handle);
-int ustctl_create_event_notifier_group(int sock,
- int pipe_fd,
- struct lttng_ust_object_data **event_notifier_group_handle);
+/*
+ * ustctl_create_event notifier_group creates a event notifier group. It
+ * establishes the connection with the application by providing a file
+ * descriptor of the pipe to be used by the application when a event notifier
+ * of that group is fired. It returns a handle to be used when creating event
+ * notifier in that group.
+ */
+int ustctl_create_event_notifier_group(int sock, int pipe_fd,
+ struct lttng_ust_abi_object_data **event_notifier_group);
+
+/*
+ * ustctl_create_event notifier creates a event notifier in a event notifier
+ * group giving a event notifier description and a event notifier group handle.
+ * It returns a event notifier handle to be used when enabling the event
+ * notifier, attaching filter, attaching exclusion, and disabling the event
+ * notifier.
+ */
int ustctl_create_event_notifier(int sock,
- struct lttng_ust_event_notifier *event_notifier,
- struct lttng_ust_object_data *event_notifier_group_handle,
- struct lttng_ust_object_data **event_notifier_data);
+ struct lttng_ust_abi_event_notifier *event_notifier,
+ struct lttng_ust_abi_object_data *event_notifier_group,
+ struct lttng_ust_abi_object_data **event_notifier_data);
/*
* ustctl_tracepoint_list returns a tracepoint list handle, or negative
* returned.
*/
int ustctl_tracepoint_list_get(int sock, int tp_list_handle,
- struct lttng_ust_tracepoint_iter *iter);
+ struct lttng_ust_abi_tracepoint_iter *iter);
/*
* ustctl_tracepoint_field_list returns a tracepoint field list handle,
* returned.
*/
int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
- struct lttng_ust_field_iter *iter);
+ struct lttng_ust_abi_field_iter *iter);
-int ustctl_tracer_version(int sock, struct lttng_ust_tracer_version *v);
+int ustctl_tracer_version(int sock, struct lttng_ust_abi_tracer_version *v);
int ustctl_wait_quiescent(int sock);
-int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object);
+int ustctl_sock_flush_buffer(int sock, struct lttng_ust_abi_object_data *object);
-int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate);
+int ustctl_calibrate(int sock, struct lttng_ust_abi_calibrate *calibrate);
/* Release object created by members of this API. */
-int ustctl_release_object(int sock, struct lttng_ust_object_data *data);
+int ustctl_release_object(int sock, struct lttng_ust_abi_object_data *data);
/* Release handle returned by create session. */
int ustctl_release_handle(int sock, int handle);
int ustctl_recv_channel_from_consumer(int sock,
- struct lttng_ust_object_data **channel_data);
+ struct lttng_ust_abi_object_data **channel_data);
int ustctl_recv_stream_from_consumer(int sock,
- struct lttng_ust_object_data **stream_data);
+ struct lttng_ust_abi_object_data **stream_data);
int ustctl_send_channel_to_ust(int sock, int session_handle,
- struct lttng_ust_object_data *channel_data);
+ struct lttng_ust_abi_object_data *channel_data);
int ustctl_send_stream_to_ust(int sock,
- struct lttng_ust_object_data *channel_data,
- struct lttng_ust_object_data *stream_data);
+ struct lttng_ust_abi_object_data *channel_data,
+ struct lttng_ust_abi_object_data *stream_data);
/*
* ustctl_duplicate_ust_object_data allocated a new object in "dest" if
* it succeeds (returns 0). It must be released using
* ustctl_release_object() and then freed with free().
*/
-int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest,
- struct lttng_ust_object_data *src);
+int ustctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **dest,
+ struct lttng_ust_abi_object_data *src);
/*
* API used by consumer.
void ustctl_flush_buffer(struct ustctl_consumer_stream *stream,
int producer_active);
+void ustctl_clear_buffer(struct ustctl_consumer_stream *stream);
/* index */
+
+/*
+ * Getters which need to be used on the current packet (between get/put
+ * or get_next/put_next.
+ */
+
int ustctl_get_timestamp_begin(struct ustctl_consumer_stream *stream,
uint64_t *timestamp_begin);
int ustctl_get_timestamp_end(struct ustctl_consumer_stream *stream,
uint64_t *content_size);
int ustctl_get_packet_size(struct ustctl_consumer_stream *stream,
uint64_t *packet_size);
-int ustctl_get_stream_id(struct ustctl_consumer_stream *stream,
- uint64_t *stream_id);
-int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream,
- uint64_t *ts);
int ustctl_get_sequence_number(struct ustctl_consumer_stream *stream,
uint64_t *seq);
+
+/*
+ * Getter returning state invariant for the stream, which can be used
+ * without "get" operation.
+ */
+
+int ustctl_get_stream_id(struct ustctl_consumer_stream *stream,
+ uint64_t *stream_id);
int ustctl_get_instance_id(struct ustctl_consumer_stream *stream,
uint64_t *id);
+/*
+ * Getter returning the current timestamp as perceived from the
+ * tracer.
+ */
+int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream,
+ uint64_t *ts);
+
/* returns whether UST has perf counters support. */
int ustctl_has_perf_counters(void);
#define USTCTL_UST_ENUM_ENTRY_PADDING 32
struct ustctl_enum_entry {
struct ustctl_enum_value start, end; /* start and end are inclusive */
- char string[LTTNG_UST_SYM_NAME_LEN];
+ char string[LTTNG_UST_ABI_SYM_NAME_LEN];
union {
struct {
uint32_t options;
union _ustctl_basic_type {
struct ustctl_integer_type integer;
struct {
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
struct ustctl_integer_type container_type;
uint64_t id; /* enum ID in sessiond. */
} enumeration;
int32_t encoding; /* enum ustctl_string_encodings */
} string;
struct {
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint64_t id; /* enum ID in sessiond. */
/* container_type follows after this struct ustctl_field. */
} enum_nestable;
/* elem_type follows after this struct ustctl_field. */
} array_nestable;
struct {
- char length_name[LTTNG_UST_SYM_NAME_LEN];
+ char length_name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint32_t alignment; /* Alignment before elements. */
/* elem_type follows after the length_type. */
} sequence_nestable;
} struct_nestable;
struct {
uint32_t nr_choices;
- char tag_name[LTTNG_UST_SYM_NAME_LEN];
+ char tag_name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint32_t alignment;
/* Followed by nr_choices struct ustctl_field. */
} variant_nestable;
} _struct;
struct {
uint32_t nr_choices;
- char tag_name[LTTNG_UST_SYM_NAME_LEN];
+ char tag_name[LTTNG_UST_ABI_SYM_NAME_LEN];
/* Followed by nr_choices struct ustctl_field. */
} variant;
} legacy;
#define USTCTL_UST_FIELD_PADDING 28
struct ustctl_field {
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
struct ustctl_type type;
char padding[USTCTL_UST_FIELD_PADDING];
} LTTNG_PACKED;
int *channel_objd, /* channel descriptor (output) */
char *event_name, /*
* event name (output,
- * size LTTNG_UST_SYM_NAME_LEN)
+ * size LTTNG_UST_ABI_SYM_NAME_LEN)
*/
int *loglevel,
char **signature, /*
enum ustctl_channel_header header_type,
int ret_code); /* return code. 0 ok, negative error */
+/*
+ * Counter API.
+ */
+
+enum ustctl_counter_bitness {
+ USTCTL_COUNTER_BITNESS_32 = 0,
+ USTCTL_COUNTER_BITNESS_64 = 1,
+};
+
+enum ustctl_counter_arithmetic {
+ USTCTL_COUNTER_ARITHMETIC_MODULAR = 0,
+ USTCTL_COUNTER_ARITHMETIC_SATURATION = 1,
+};
+
+/* Used as alloc flags. */
+enum ustctl_counter_alloc {
+ USTCTL_COUNTER_ALLOC_PER_CPU = (1 << 0),
+ USTCTL_COUNTER_ALLOC_GLOBAL = (1 << 1),
+};
+
+struct ustctl_daemon_counter;
+
+int ustctl_get_nr_cpu_per_counter(void);
+
+struct ustctl_counter_dimension {
+ uint64_t size;
+ uint64_t underflow_index;
+ uint64_t overflow_index;
+ uint8_t has_underflow;
+ uint8_t has_overflow;
+};
+
+struct ustctl_daemon_counter *
+ ustctl_create_counter(size_t nr_dimensions,
+ const struct ustctl_counter_dimension *dimensions,
+ int64_t global_sum_step,
+ int global_counter_fd,
+ int nr_counter_cpu_fds,
+ const int *counter_cpu_fds,
+ enum ustctl_counter_bitness bitness,
+ enum ustctl_counter_arithmetic arithmetic,
+ uint32_t alloc_flags,
+ bool coalesce_hits);
+
+int ustctl_create_counter_data(struct ustctl_daemon_counter *counter,
+ struct lttng_ust_abi_object_data **counter_data);
+
+int ustctl_create_counter_global_data(struct ustctl_daemon_counter *counter,
+ struct lttng_ust_abi_object_data **counter_global_data);
+int ustctl_create_counter_cpu_data(struct ustctl_daemon_counter *counter, int cpu,
+ struct lttng_ust_abi_object_data **counter_cpu_data);
+
+/*
+ * Each counter data and counter cpu data created need to be destroyed
+ * before calling ustctl_destroy_counter().
+ */
+void ustctl_destroy_counter(struct ustctl_daemon_counter *counter);
+
+int ustctl_send_counter_data_to_ust(int sock, int parent_handle,
+ struct lttng_ust_abi_object_data *counter_data);
+int ustctl_send_counter_global_data_to_ust(int sock,
+ struct lttng_ust_abi_object_data *counter_data,
+ struct lttng_ust_abi_object_data *counter_global_data);
+int ustctl_send_counter_cpu_data_to_ust(int sock,
+ struct lttng_ust_abi_object_data *counter_data,
+ struct lttng_ust_abi_object_data *counter_cpu_data);
+
+int ustctl_counter_read(struct ustctl_daemon_counter *counter,
+ const size_t *dimension_indexes,
+ int cpu, int64_t *value,
+ bool *overflow, bool *underflow);
+int ustctl_counter_aggregate(struct ustctl_daemon_counter *counter,
+ const size_t *dimension_indexes,
+ int64_t *value,
+ bool *overflow, bool *underflow);
+int ustctl_counter_clear(struct ustctl_daemon_counter *counter,
+ const size_t *dimension_indexes);
+
#endif /* LTTNG_UST_CTL_INTERNAL_H */
* during enum registration.
*/
if (strncmp(first->enumeration.name, second->enumeration.name,
- LTTNG_UST_SYM_NAME_LEN)) {
+ LTTNG_UST_ABI_SYM_NAME_LEN)) {
goto no_match;
}
if (!match_ustctl_field_integer(&first->enumeration.container_type,
const struct ustctl_field *second)
{
/* Check the name of the field is identical. */
- if (strncmp(first->name, second->name, LTTNG_UST_SYM_NAME_LEN)) {
+ if (strncmp(first->name, second->name, LTTNG_UST_ABI_SYM_NAME_LEN)) {
goto no_match;
}
/* Compare tag name of the variants. */
if (strncmp(first->type.u.legacy.variant.tag_name,
second->type.u.legacy.variant.tag_name,
- LTTNG_UST_SYM_NAME_LEN)) {
+ LTTNG_UST_ABI_SYM_NAME_LEN)) {
goto no_match;
}
break;
/* Compare length_name of the sequences. */
if (strncmp(first->type.u.sequence_nestable.length_name,
second->type.u.sequence_nestable.length_name,
- LTTNG_UST_SYM_NAME_LEN)) {
+ LTTNG_UST_ABI_SYM_NAME_LEN)) {
goto no_match;
}
/* Comparison will be done when marshalling following items. */
/* Compare name of the enums. */
if (strncmp(first->type.u.enum_nestable.name,
second->type.u.enum_nestable.name,
- LTTNG_UST_SYM_NAME_LEN)) {
+ LTTNG_UST_ABI_SYM_NAME_LEN)) {
goto no_match;
}
/* Comparison of element type will be done when marshalling following item. */
/* Compare tag name of the variants. */
if (strncmp(first->type.u.variant_nestable.tag_name,
second->type.u.variant_nestable.tag_name,
- LTTNG_UST_SYM_NAME_LEN)) {
+ LTTNG_UST_ABI_SYM_NAME_LEN)) {
goto no_match;
}
break;
{
size_t i;
- for (i = 0; i < LTTNG_UST_SYM_NAME_LEN; i++) {
+ for (i = 0; i < LTTNG_UST_ABI_SYM_NAME_LEN; i++) {
switch (in[i]) {
case '.':
case '$':
size_t nr_entries;
int ret = 0;
size_t i;
- char identifier[LTTNG_UST_SYM_NAME_LEN];
+ char identifier[LTTNG_UST_ABI_SYM_NAME_LEN];
rcu_read_lock();
reg_enum = ust_registry_lookup_enum_by_id(session, enum_name, enum_id);
const struct ustctl_field *variant = &fields[*iter_field];
uint32_t i;
int ret;
- char identifier[LTTNG_UST_SYM_NAME_LEN];
+ char identifier[LTTNG_UST_ABI_SYM_NAME_LEN];
if (variant->type.atype != ustctl_atype_variant) {
ret = -EINVAL;
assert(_enum);
key = _key;
- if (strncmp(_enum->name, key->name, LTTNG_UST_SYM_NAME_LEN)) {
+ if (strncmp(_enum->name, key->name, LTTNG_UST_ABI_SYM_NAME_LEN)) {
goto no_match;
}
if (compare_enums(_enum, key)) {
struct ust_registry_enum reg_enum_lookup;
memset(®_enum_lookup, 0, sizeof(reg_enum_lookup));
- strncpy(reg_enum_lookup.name, enum_name, LTTNG_UST_SYM_NAME_LEN);
- reg_enum_lookup.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(reg_enum_lookup.name, enum_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ reg_enum_lookup.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
reg_enum_lookup.id = enum_id;
cds_lfht_lookup(session->enums->ht,
ht_hash_enum((void *) ®_enum_lookup, lttng_ht_seed),
ret = -ENOMEM;
goto end;
}
- strncpy(reg_enum->name, enum_name, LTTNG_UST_SYM_NAME_LEN);
- reg_enum->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(reg_enum->name, enum_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ reg_enum->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
/* entries will be owned by reg_enum. */
reg_enum->entries = entries;
reg_enum->nr_entries = nr_entries;
int session_objd;
int channel_objd;
/* Name of the event returned by the tracer. */
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
char *signature;
int loglevel_value;
size_t nr_fields;
};
struct ust_registry_enum {
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
struct ustctl_enum_entry *entries;
size_t nr_entries;
uint64_t id; /* enum id in session */
uint32_t handle;
uint32_t cmd;
union {
- struct lttng_ust_channel channel;
- struct lttng_ust_stream stream;
- struct lttng_ust_event event;
- struct lttng_ust_context context;
- struct lttng_ust_tracer_version version;
+ struct lttng_ust_abi_channel channel;
+ struct lttng_ust_abi_stream stream;
+ struct lttng_ust_abi_event event;
+ struct lttng_ust_abi_context context;
+ struct lttng_ust_abi_tracer_version version;
} u;
} LTTNG_PACKED;
struct {
uint64_t memory_map_size;
} LTTNG_PACKED stream;
- struct lttng_ust_tracer_version version;
+ struct lttng_ust_abi_tracer_version version;
} u;
} LTTNG_PACKED;
switch (msg.u.ask_channel.output) {
case LTTNG_EVENT_MMAP:
default:
- attr.output = LTTNG_UST_MMAP;
+ attr.output = LTTNG_UST_ABI_MMAP;
break;
}
/* Translate and save channel type. */
switch (msg.u.ask_channel.type) {
- case LTTNG_UST_CHAN_PER_CPU:
+ case LTTNG_UST_ABI_CHAN_PER_CPU:
channel->type = CONSUMER_CHANNEL_TYPE_DATA;
- attr.type = LTTNG_UST_CHAN_PER_CPU;
+ attr.type = LTTNG_UST_ABI_CHAN_PER_CPU;
/*
* Set refcount to 1 for owner. Below, we will
* pass ownership to the
*/
channel->refcount = 1;
break;
- case LTTNG_UST_CHAN_METADATA:
+ case LTTNG_UST_ABI_CHAN_METADATA:
channel->type = CONSUMER_CHANNEL_TYPE_METADATA;
- attr.type = LTTNG_UST_CHAN_METADATA;
+ attr.type = LTTNG_UST_ABI_CHAN_METADATA;
break;
default:
assert(0);
goto end_channel_error;
}
- if (msg.u.ask_channel.type == LTTNG_UST_CHAN_METADATA) {
+ if (msg.u.ask_channel.type == LTTNG_UST_ABI_CHAN_METADATA) {
ret = consumer_metadata_cache_allocate(channel);
if (ret < 0) {
ERR("Allocating metadata cache");
*/
ret = add_channel(channel, ctx);
if (ret < 0) {
- if (msg.u.ask_channel.type == LTTNG_UST_CHAN_METADATA) {
+ if (msg.u.ask_channel.type == LTTNG_UST_ABI_CHAN_METADATA) {
if (channel->switch_timer_enabled == 1) {
consumer_timer_switch_stop(channel);
}
ok(uchan->enabled == 0 &&
strncmp(uchan->name, "channel0", 8) == 0 &&
- uchan->name[LTTNG_UST_SYM_NAME_LEN - 1] == '\0' &&
+ uchan->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] == '\0' &&
uchan->ctx != NULL &&
uchan->events != NULL &&
uchan->attr.overwrite == attr.attr.overwrite,
}
ok(event->enabled == 0 &&
- event->attr.instrumentation == LTTNG_UST_TRACEPOINT &&
+ event->attr.instrumentation == LTTNG_UST_ABI_TRACEPOINT &&
strcmp(event->attr.name, ev.name) == 0 &&
- event->attr.name[LTTNG_UST_SYM_NAME_LEN - 1] == '\0',
+ event->attr.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] == '\0',
"Validate UST event");
trace_ust_destroy_event(event);
}
ok(event->enabled == 0 &&
- event->attr.instrumentation == LTTNG_UST_TRACEPOINT &&
+ event->attr.instrumentation == LTTNG_UST_ABI_TRACEPOINT &&
strcmp(event->attr.name, ev.name) == 0 &&
event->exclusion != NULL &&
event->exclusion->count == exclusion_count &&
!memcmp(event->exclusion->names, exclusion_copy->names,
LTTNG_SYMBOL_NAME_LEN * exclusion_count) &&
- event->attr.name[LTTNG_UST_SYM_NAME_LEN - 1] == '\0',
+ event->attr.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] == '\0',
"Validate UST event and exclusion");
trace_ust_destroy_event(event);
ok(uctx != NULL, "Create UST context");
if (uctx) {
- ok((int) uctx->ctx.ctx == LTTNG_UST_CONTEXT_VTID,
+ ok((int) uctx->ctx.ctx == LTTNG_UST_ABI_CONTEXT_VTID,
"Validate UST context");
} else {
skip(1, "Skipping UST context validation as creation failed");