-/*
- * beware: we don't keep the mutex over the send, but we must walk the
- * whole list each time we are called again. So sending one tracepoint
- * at a time means this is O(n^2). TODO: do as in the kernel and send
- * multiple tracepoints for each call to amortize this cost.
- */
-static
-void ltt_tracepoint_list_get(struct ltt_tracepoint_list *list,
- char *tp_list_entry)
-{
-next:
- if (!list->got_first) {
- tracepoint_iter_start(&list->iter);
- list->got_first = 1;
- goto copy;
- }
- tracepoint_iter_next(&list->iter);
-copy:
- if (!list->iter.tracepoint) {
- tp_list_entry[0] = '\0'; /* end of list */
- } else {
- if (!strcmp((*list->iter.tracepoint)->name,
- "lttng_ust:metadata"))
- goto next;
- memcpy(tp_list_entry, (*list->iter.tracepoint)->name,
- LTTNG_UST_SYM_NAME_LEN);
- }
-}
-