Lines Matching refs:efd
40 int fd, efd, err, id; in load_and_attach() local
91 efd = open(buf, O_RDONLY, 0); in load_and_attach()
92 if (efd < 0) { in load_and_attach()
97 err = read(efd, buf, sizeof(buf)); in load_and_attach()
103 close(efd); in load_and_attach()
109 efd = perf_event_open(&attr, -1/*pid*/, 0/*cpu*/, -1/*group_fd*/, 0); in load_and_attach()
110 if (efd < 0) { in load_and_attach()
111 printf("event %d fd %d err %s\n", id, efd, strerror(errno)); in load_and_attach()
114 event_fd[prog_cnt - 1] = efd; in load_and_attach()
115 ioctl(efd, PERF_EVENT_IOC_ENABLE, 0); in load_and_attach()
116 ioctl(efd, PERF_EVENT_IOC_SET_BPF, fd); in load_and_attach()