Home
last modified time | relevance | path

Searched refs:fda (Results 1 – 8 of 8) sorted by relevance

/tools/lib/api/fd/
A Darray.c17 fda->nr = fda->nr_alloc = 0; in fdarray__init()
49 struct fdarray *fda = calloc(1, sizeof(*fda)); in fdarray__new() local
60 return fda; in fdarray__new()
73 free(fda); in fdarray__delete()
80 if (fda->nr == fda->nr_alloc && in fdarray__add()
81 fdarray__grow(fda, fda->nr_autogrow) < 0) in fdarray__add()
84 fda->entries[fda->nr].fd = fd; in fdarray__add()
85 fda->entries[fda->nr].events = revents; in fdarray__add()
86 fda->priv[fda->nr].flags = flags; in fdarray__add()
87 fda->nr++; in fdarray__add()
[all …]
A Darray.h39 void fdarray__init(struct fdarray *fda, int nr_autogrow);
40 void fdarray__exit(struct fdarray *fda);
43 void fdarray__delete(struct fdarray *fda);
46 int fdarray__dup_entry_from(struct fdarray *fda, int pos, struct fdarray *from);
47 int fdarray__poll(struct fdarray *fda, int timeout);
48 int fdarray__filter(struct fdarray *fda, short revents,
49 void (*entry_destructor)(struct fdarray *fda, int fd, void *arg),
51 int fdarray__grow(struct fdarray *fda, int extra);
52 int fdarray__fprintf(struct fdarray *fda, FILE *fp);
54 static inline int fdarray__available_entries(struct fdarray *fda) in fdarray__available_entries() argument
[all …]
/tools/perf/tests/
A Dfdarray.c11 fda->nr = fda->nr_alloc; in fdarray__init_revents()
13 for (fd = 0; fd < fda->nr; ++fd) { in fdarray__init_revents()
14 fda->entries[fd].fd = fda->nr - fd; in fdarray__init_revents()
36 if (fda == NULL) { in test__fdarray__filter()
43 if (nr_fds != fda->nr_alloc) { in test__fdarray__filter()
45 nr_fds, fda->nr_alloc); in test__fdarray__filter()
53 nr_fds, fda->nr_alloc); in test__fdarray__filter()
87 fdarray__delete(fda); in test__fdarray__filter()
97 if (fda == NULL) { in test__fdarray__add()
134 if (fda->entries == NULL) { in test__fdarray__add()
[all …]
/tools/perf/
A Dbuiltin-daemon.c1258 struct fdarray fda; in __cmd_start() local
1294 fdarray__init(&fda, 3); in __cmd_start()
1308 sock_pos = fdarray__add(&fda, sock_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1312 file_pos = fdarray__add(&fda, conf_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1316 signal_pos = fdarray__add(&fda, signal_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1327 if (!err && fdarray__poll(&fda, -1)) { in __cmd_start()
1330 if (fda.entries[sock_pos].revents & POLLIN) in __cmd_start()
1332 if (fda.entries[file_pos].revents & POLLIN) in __cmd_start()
1334 if (fda.entries[signal_pos].revents & POLLIN) in __cmd_start()
1343 fdarray__exit(&fda); in __cmd_start()
A Dbuiltin-record.c1233 struct fdarray *fda = &evlist->core.pollfd; in record__dup_non_perf_events() local
1236 for (i = 0; i < fda->nr; i++) { in record__dup_non_perf_events()
1237 if (!(fda->priv[i].flags & fdarray_flag__non_perf_event)) in record__dup_non_perf_events()
1239 ret = fdarray__dup_entry_from(&thread_data->pollfd, i, fda); in record__dup_non_perf_events()
1245 thread_data, ret, fda->entries[i].fd); in record__dup_non_perf_events()
1693 static void record__thread_munmap_filtered(struct fdarray *fda, int fd, in record__thread_munmap_filtered() argument
1696 struct perf_mmap *map = fda->priv[fd].ptr; in record__thread_munmap_filtered()
A Dbuiltin-kvm.c1447 struct fdarray *fda = &kvm->evlist->core.pollfd; in kvm_events_live_report() local
1458 if (fda->entries[nr_stdin].revents & POLLIN) in kvm_events_live_report()
/tools/testing/selftests/net/
A Dmsg_zerocopy.c162 int fda = fd; in do_accept() local
164 fd = accept(fda, NULL, NULL); in do_accept()
167 if (close(fda)) in do_accept()
/tools/lib/perf/
A Devlist.c416 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd, in perf_evlist__munmap_filtered() argument
419 struct perf_mmap *map = fda->priv[fd].ptr; in perf_evlist__munmap_filtered()

Completed in 864 milliseconds