X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-probes.c;h=00ce54cb36a9117338cecf4cc1bc3496f0b94227;hb=a40b5b8cd4af87564b297e343de14779c1bfc11a;hp=2306e1e63f48b30c30065c865fa1fc7e2a24db19;hpb=864a1eda22ed99266509ac76451c6f27f91aa17e;p=lttng-ust.git diff --git a/liblttng-ust/lttng-probes.c b/liblttng-ust/lttng-probes.c index 2306e1e6..00ce54cb 100644 --- a/liblttng-ust/lttng-probes.c +++ b/liblttng-ust/lttng-probes.c @@ -44,13 +44,13 @@ static int lazy_nesting; * Called under ust lock. */ static -int check_event_provider(struct lttng_probe_desc *desc) +int check_event_provider(struct lttng_ust_probe_desc *desc) { int i; size_t provider_name_len; provider_name_len = strnlen(desc->provider, - LTTNG_UST_SYM_NAME_LEN - 1); + LTTNG_UST_ABI_SYM_NAME_LEN - 1); for (i = 0; i < desc->nr_events; i++) { if (strncmp(desc->event_desc[i]->name, desc->provider, @@ -64,9 +64,9 @@ int check_event_provider(struct lttng_probe_desc *desc) * Called under ust lock. */ static -void lttng_lazy_probe_register(struct lttng_probe_desc *desc) +void lttng_lazy_probe_register(struct lttng_ust_probe_desc *desc) { - struct lttng_probe_desc *iter; + struct lttng_ust_probe_desc *iter; struct cds_list_head *probe_list; /* @@ -84,7 +84,7 @@ void lttng_lazy_probe_register(struct lttng_probe_desc *desc) */ /* - * We sort the providers by struct lttng_probe_desc pointer + * We sort the providers by struct lttng_ust_probe_desc pointer * address. */ probe_list = &_probe_list; @@ -109,7 +109,7 @@ desc_added: static void fixup_lazy_probes(void) { - struct lttng_probe_desc *iter, *tmp; + struct lttng_ust_probe_desc *iter, *tmp; int ret; lazy_nesting++; @@ -135,7 +135,7 @@ struct cds_list_head *lttng_get_probe_list_head(void) } static -int check_provider_version(struct lttng_probe_desc *desc) +int check_provider_version(struct lttng_ust_probe_desc *desc) { /* * Check tracepoint provider version compatibility. @@ -164,7 +164,7 @@ int check_provider_version(struct lttng_probe_desc *desc) } -int lttng_probe_register(struct lttng_probe_desc *desc) +int lttng_ust_probe_register(struct lttng_ust_probe_desc *desc) { int ret = 0; @@ -197,7 +197,7 @@ int lttng_probe_register(struct lttng_probe_desc *desc) return ret; } -void lttng_probe_unregister(struct lttng_probe_desc *desc) +void lttng_ust_probe_unregister(struct lttng_ust_probe_desc *desc) { lttng_ust_fixup_tls(); @@ -231,7 +231,7 @@ void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list) */ int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list) { - struct lttng_probe_desc *probe_desc; + struct lttng_ust_probe_desc *probe_desc; int i; struct cds_list_head *probe_list; @@ -247,8 +247,8 @@ int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list) cds_list_add(&list_entry->head, &list->head); strncpy(list_entry->tp.name, probe_desc->event_desc[i]->name, - LTTNG_UST_SYM_NAME_LEN); - list_entry->tp.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0'; + LTTNG_UST_ABI_SYM_NAME_LEN); + list_entry->tp.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0'; if (!probe_desc->event_desc[i]->loglevel) { list_entry->tp.loglevel = TRACE_DEFAULT; } else { @@ -272,7 +272,7 @@ err_nomem: * Return current iteration position, advance internal iterator to next. * Return NULL if end of list. */ -struct lttng_ust_tracepoint_iter * +struct lttng_ust_abi_tracepoint_iter * lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list) { struct tp_list_entry *entry; @@ -303,7 +303,7 @@ void lttng_probes_prune_field_list(struct lttng_ust_field_list *list) */ int lttng_probes_get_field_list(struct lttng_ust_field_list *list) { - struct lttng_probe_desc *probe_desc; + struct lttng_ust_probe_desc *probe_desc; int i; struct cds_list_head *probe_list; @@ -311,7 +311,7 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list) CDS_INIT_LIST_HEAD(&list->head); cds_list_for_each_entry(probe_desc, probe_list, head) { for (i = 0; i < probe_desc->nr_events; i++) { - const struct lttng_event_desc *event_desc = + const struct lttng_ust_event_desc *event_desc = probe_desc->event_desc[i]; int j; @@ -325,10 +325,10 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list) cds_list_add(&list_entry->head, &list->head); strncpy(list_entry->field.event_name, event_desc->name, - LTTNG_UST_SYM_NAME_LEN); - list_entry->field.event_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0'; + LTTNG_UST_ABI_SYM_NAME_LEN); + list_entry->field.event_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0'; list_entry->field.field_name[0] = '\0'; - list_entry->field.type = LTTNG_UST_FIELD_OTHER; + list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER; if (!event_desc->loglevel) { list_entry->field.loglevel = TRACE_DEFAULT; } else { @@ -338,8 +338,8 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list) } for (j = 0; j < event_desc->nr_fields; j++) { - const struct lttng_event_field *event_field = - &event_desc->fields[j]; + const struct lttng_ust_event_field *event_field = + event_desc->fields[j]; struct tp_field_list_entry *list_entry; list_entry = zmalloc(sizeof(*list_entry)); @@ -348,56 +348,39 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list) cds_list_add(&list_entry->head, &list->head); strncpy(list_entry->field.event_name, event_desc->name, - LTTNG_UST_SYM_NAME_LEN); - list_entry->field.event_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0'; + LTTNG_UST_ABI_SYM_NAME_LEN); + list_entry->field.event_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0'; strncpy(list_entry->field.field_name, event_field->name, - LTTNG_UST_SYM_NAME_LEN); - list_entry->field.field_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0'; - switch (event_field->type.atype) { - case atype_integer: - list_entry->field.type = LTTNG_UST_FIELD_INTEGER; + LTTNG_UST_ABI_SYM_NAME_LEN); + list_entry->field.field_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0'; + switch (event_field->type->type) { + case lttng_ust_type_integer: + list_entry->field.type = LTTNG_UST_ABI_FIELD_INTEGER; break; - case atype_string: - list_entry->field.type = LTTNG_UST_FIELD_STRING; + case lttng_ust_type_string: + list_entry->field.type = LTTNG_UST_ABI_FIELD_STRING; break; - case atype_array: - if (event_field->type.u.legacy.array.elem_type.atype != atype_integer - || event_field->type.u.legacy.array.elem_type.u.basic.integer.encoding == lttng_encode_none) - list_entry->field.type = LTTNG_UST_FIELD_OTHER; + case lttng_ust_type_array: + if (lttng_ust_get_type_array(event_field->type)->encoding == lttng_ust_string_encoding_none) + list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER; else - list_entry->field.type = LTTNG_UST_FIELD_STRING; + list_entry->field.type = LTTNG_UST_ABI_FIELD_STRING; break; - case atype_array_nestable: - if (event_field->type.u.array_nestable.elem_type->atype != atype_integer - || event_field->type.u.array_nestable.elem_type->u.integer.encoding == lttng_encode_none) - list_entry->field.type = LTTNG_UST_FIELD_OTHER; + case lttng_ust_type_sequence: + if (lttng_ust_get_type_sequence(event_field->type)->encoding == lttng_ust_string_encoding_none) + list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER; else - list_entry->field.type = LTTNG_UST_FIELD_STRING; + list_entry->field.type = LTTNG_UST_ABI_FIELD_STRING; break; - case atype_sequence: - if (event_field->type.u.legacy.sequence.elem_type.atype != atype_integer - || event_field->type.u.legacy.sequence.elem_type.u.basic.integer.encoding == lttng_encode_none) - list_entry->field.type = LTTNG_UST_FIELD_OTHER; - else - list_entry->field.type = LTTNG_UST_FIELD_STRING; - break; - case atype_sequence_nestable: - if (event_field->type.u.sequence_nestable.elem_type->atype != atype_integer - || event_field->type.u.sequence_nestable.elem_type->u.integer.encoding == lttng_encode_none) - list_entry->field.type = LTTNG_UST_FIELD_OTHER; - else - list_entry->field.type = LTTNG_UST_FIELD_STRING; - break; - case atype_float: - list_entry->field.type = LTTNG_UST_FIELD_FLOAT; + case lttng_ust_type_float: + list_entry->field.type = LTTNG_UST_ABI_FIELD_FLOAT; break; - case atype_enum: /* Fall-through */ - case atype_enum_nestable: - list_entry->field.type = LTTNG_UST_FIELD_ENUM; + case lttng_ust_type_enum: + list_entry->field.type = LTTNG_UST_ABI_FIELD_ENUM; break; default: - list_entry->field.type = LTTNG_UST_FIELD_OTHER; + list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER; } if (!event_desc->loglevel) { list_entry->field.loglevel = TRACE_DEFAULT; @@ -425,7 +408,7 @@ err_nomem: * Return current iteration position, advance internal iterator to next. * Return NULL if end of list. */ -struct lttng_ust_field_iter * +struct lttng_ust_abi_field_iter * lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list) { struct tp_field_list_entry *entry;