Lines Matching refs:cov
59 static void cover_open(cover_t* cov) in cover_open() argument
64 if (dup2(fd, cov->fd) < 0) in cover_open()
65 fail("filed to dup2(%d, %d) cover fd", fd, cov->fd); in cover_open()
67 if (ioctl(cov->fd, KIOSETBUFSIZE, &kCoverSize)) in cover_open()
72 MAP_SHARED, cov->fd, 0); in cover_open()
75 cov->data = mmap_ptr; in cover_open()
76 cov->data_end = mmap_ptr + mmap_alloc_size; in cover_open()
79 static void cover_enable(cover_t* cov, bool collect_comps) in cover_enable() argument
82 if (ioctl(cov->fd, KIOENABLE, &kcov_mode)) in cover_enable()
86 static void cover_reset(cover_t* cov) in cover_reset() argument
88 *(uint64*)cov->data = 0; in cover_reset()
91 static void cover_collect(cover_t* cov) in cover_collect() argument
93 cov->size = *(uint64*)cov->data; in cover_collect()