X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-probes.c;h=9d7d83ceab716c62687bef3801ab0b59c6a56a0d;hb=7047f3daaab1059013579cc0257bb0f551931b82;hp=e473b9890c9395f73121736a6dc6333399e373a1;hpb=7dd08bec735b428479201f9f84d59c78deabdf57;p=lttng-ust.git diff --git a/liblttng-ust/lttng-probes.c b/liblttng-ust/lttng-probes.c index e473b989..9d7d83ce 100644 --- a/liblttng-ust/lttng-probes.c +++ b/liblttng-ust/lttng-probes.c @@ -38,7 +38,12 @@ /* * probe list is protected by ust_lock()/ust_unlock(). */ -static CDS_LIST_HEAD(probe_list); +CDS_LIST_HEAD(probe_list); + +struct cds_list_head *lttng_get_probe_list_head(void) +{ + return &probe_list; +} static const struct lttng_probe_desc *find_provider(const char *provider) @@ -116,7 +121,7 @@ desc_added: ed = desc->event_desc[i]; DBG("Registered event probe \"%s\" with signature \"%s\"", ed->name, ed->signature); - ret = pending_probe_fix_events(ed); + ret = lttng_fix_pending_event_desc(ed); assert(!ret); } end: @@ -366,58 +371,3 @@ struct lttng_ust_field_iter * struct tp_field_list_entry, head); return &entry->field; } - -/* - * marshall all probes/all events and create those that fit the - * wildcard. Add them to the events list as created. - */ -void lttng_probes_create_wildcard_events(struct wildcard_entry *entry, - struct session_wildcard *wildcard) -{ - struct lttng_probe_desc *probe_desc; - struct lttng_ust_event event_param; - int i; - - 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; - int match = 0; - - event_desc = probe_desc->event_desc[i]; - /* compare excluding final '*' */ - assert(strlen(entry->name) > 0); - if (strcmp(event_desc->name, "lttng_ust:metadata") - && (strlen(entry->name) == 1 - || !strncmp(event_desc->name, entry->name, - strlen(entry->name) - 1))) { - if (lttng_loglevel_match(event_desc, - entry->loglevel_type, - entry->loglevel)) { - match = 1; - } - } - if (match) { - struct lttng_event *ev; - int ret; - - memcpy(&event_param, &wildcard->event_param, - sizeof(event_param)); - strncpy(event_param.name, - event_desc->name, - sizeof(event_param.name)); - event_param.name[sizeof(event_param.name) - 1] = '\0'; - /* create event */ - ret = lttng_event_create(wildcard->chan, - &event_param, &ev); - if (ret) { - DBG("Error creating event"); - continue; - } - cds_list_add(&ev->wildcard_list, - &wildcard->events); - } - } - } - lttng_filter_wildcard_link_bytecode(wildcard); -} -