/*
* 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)
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:
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);
-}
-