Lines Matching refs:iter
512 struct gcov_iterator *iter; in gcov_iter_new() local
514 iter = malloc(sizeof(struct gcov_iterator), M_GCOV, M_NOWAIT|M_ZERO); in gcov_iter_new()
515 if (iter == NULL) in gcov_iter_new()
518 iter->info = info; in gcov_iter_new()
520 iter->size = convert_to_gcda(NULL, info); in gcov_iter_new()
521 iter->buffer = malloc(iter->size, M_GCOV, M_NOWAIT); in gcov_iter_new()
522 if (!iter->buffer) in gcov_iter_new()
525 convert_to_gcda(iter->buffer, info); in gcov_iter_new()
527 return iter; in gcov_iter_new()
530 free(iter, M_GCOV); in gcov_iter_new()
540 gcov_iter_free(struct gcov_iterator *iter) in gcov_iter_free() argument
542 free(iter->buffer, M_GCOV); in gcov_iter_free()
543 free(iter, M_GCOV); in gcov_iter_free()
551 gcov_iter_get_info(struct gcov_iterator *iter) in gcov_iter_get_info() argument
553 return (iter->info); in gcov_iter_get_info()
561 gcov_iter_start(struct gcov_iterator *iter) in gcov_iter_start() argument
563 iter->pos = 0; in gcov_iter_start()
573 gcov_iter_next(struct gcov_iterator *iter) in gcov_iter_next() argument
575 if (iter->pos < iter->size) in gcov_iter_next()
576 iter->pos += ITER_STRIDE; in gcov_iter_next()
578 if (iter->pos >= iter->size) in gcov_iter_next()
592 gcov_iter_write(struct gcov_iterator *iter, struct sbuf *sbuf) in gcov_iter_write() argument
596 if (iter->pos >= iter->size) in gcov_iter_write()
600 if (iter->pos + len > iter->size) in gcov_iter_write()
601 len = iter->size - iter->pos; in gcov_iter_write()
603 sbuf_bcat(sbuf, iter->buffer + iter->pos, len); in gcov_iter_write()