• Home
  • Raw
  • Download

Lines Matching refs:iter

113 	struct gcov_iterator *iter;  in gcov_iter_new()  local
119 iter = kvmalloc(struct_size(iter, buffer, size), GFP_KERNEL); in gcov_iter_new()
120 if (!iter) in gcov_iter_new()
123 iter->info = info; in gcov_iter_new()
124 iter->size = size; in gcov_iter_new()
125 convert_to_gcda(iter->buffer, info); in gcov_iter_new()
127 return iter; in gcov_iter_new()
135 static void gcov_iter_free(struct gcov_iterator *iter) in gcov_iter_free() argument
137 kvfree(iter); in gcov_iter_free()
144 static struct gcov_info *gcov_iter_get_info(struct gcov_iterator *iter) in gcov_iter_get_info() argument
146 return iter->info; in gcov_iter_get_info()
153 static void gcov_iter_start(struct gcov_iterator *iter) in gcov_iter_start() argument
155 iter->pos = 0; in gcov_iter_start()
164 static int gcov_iter_next(struct gcov_iterator *iter) in gcov_iter_next() argument
166 if (iter->pos < iter->size) in gcov_iter_next()
167 iter->pos += ITER_STRIDE; in gcov_iter_next()
169 if (iter->pos >= iter->size) in gcov_iter_next()
182 static int gcov_iter_write(struct gcov_iterator *iter, struct seq_file *seq) in gcov_iter_write() argument
186 if (iter->pos >= iter->size) in gcov_iter_write()
190 if (iter->pos + len > iter->size) in gcov_iter_write()
191 len = iter->size - iter->pos; in gcov_iter_write()
193 seq_write(seq, iter->buffer + iter->pos, len); in gcov_iter_write()
219 struct gcov_iterator *iter = data; in gcov_seq_next() local
222 if (gcov_iter_next(iter)) in gcov_seq_next()
225 return iter; in gcov_seq_next()
231 struct gcov_iterator *iter = data; in gcov_seq_show() local
233 if (gcov_iter_write(iter, seq)) in gcov_seq_show()
291 struct gcov_iterator *iter; in gcov_seq_open() local
305 iter = gcov_iter_new(info); in gcov_seq_open()
306 if (!iter) in gcov_seq_open()
312 seq->private = iter; in gcov_seq_open()
318 gcov_iter_free(iter); in gcov_seq_open()
330 struct gcov_iterator *iter; in gcov_seq_release() local
335 iter = seq->private; in gcov_seq_release()
336 info = gcov_iter_get_info(iter); in gcov_seq_release()
337 gcov_iter_free(iter); in gcov_seq_release()