Lines Matching refs:fd
34 int fd; in __event() local
51 fd = sys_perf_event_open(attr, -1, 0, -1, in __event()
53 if (fd < 0) { in __event()
58 return fd; in __event()
74 int i, fd[wp_cnt], fd_wp, ret; in bp_accounting() local
77 fd[i] = wp_event((void *)&the_var, &attr); in bp_accounting()
78 TEST_ASSERT_VAL("failed to create wp\n", fd[i] != -1); in bp_accounting()
86 ret = ioctl(fd[0], PERF_EVENT_IOC_MODIFY_ATTRIBUTES, &attr_mod); in bp_accounting()
98 close(fd[i]); in bp_accounting()
107 int fd[100], cnt = 0, i; in detect_cnt() local
114 fd[cnt] = __event(is_x, addr, &attr); in detect_cnt()
116 if (fd[cnt] < 0) in detect_cnt()
122 close(fd[i]); in detect_cnt()
130 int fd, ret = 1; in detect_ioctl() local
132 fd = wp_event((void *) &the_var, &attr); in detect_ioctl()
133 if (fd > 0) { in detect_ioctl()
134 ret = ioctl(fd, PERF_EVENT_IOC_MODIFY_ATTRIBUTES, &attr); in detect_ioctl()
135 close(fd); in detect_ioctl()
144 int i, fd[wp_cnt + bp_cnt], ret; in detect_share() local
147 fd[i] = wp_event((void *)&the_var, &attr); in detect_share()
148 TEST_ASSERT_VAL("failed to create wp\n", fd[i] != -1); in detect_share()
152 fd[i] = bp_event((void *)test_function, &attr); in detect_share()
153 if (fd[i] == -1) in detect_share()
160 close(fd[i]); in detect_share()