Lines Matching refs:efd
54 int fd, efd, err, id; in load_and_attach() local
121 efd = open(buf, O_RDONLY, 0); in load_and_attach()
122 if (efd < 0) { in load_and_attach()
127 err = read(efd, buf, sizeof(buf)); in load_and_attach()
133 close(efd); in load_and_attach()
139 efd = perf_event_open(&attr, -1/*pid*/, 0/*cpu*/, -1/*group_fd*/, 0); in load_and_attach()
140 if (efd < 0) { in load_and_attach()
141 printf("event %d fd %d err %s\n", id, efd, strerror(errno)); in load_and_attach()
144 event_fd[prog_cnt - 1] = efd; in load_and_attach()
145 ioctl(efd, PERF_EVENT_IOC_ENABLE, 0); in load_and_attach()
146 ioctl(efd, PERF_EVENT_IOC_SET_BPF, fd); in load_and_attach()