Lines Matching refs:info
96 const char *gcov_info_filename(struct gcov_info *info) in gcov_info_filename() argument
98 return info->filename; in gcov_info_filename()
105 unsigned int gcov_info_version(struct gcov_info *info) in gcov_info_version() argument
107 return info->version; in gcov_info_version()
117 struct gcov_info *gcov_info_next(struct gcov_info *info) in gcov_info_next() argument
119 if (!info) in gcov_info_next()
122 return info->next; in gcov_info_next()
129 void gcov_info_link(struct gcov_info *info) in gcov_info_link() argument
131 info->next = gcov_info_head; in gcov_info_link()
132 gcov_info_head = info; in gcov_info_link()
140 void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info) in gcov_info_unlink() argument
143 prev->next = info->next; in gcov_info_unlink()
145 gcov_info_head = info->next; in gcov_info_unlink()
157 static int counter_active(struct gcov_info *info, unsigned int type) in counter_active() argument
159 return info->merge[type] ? 1 : 0; in counter_active()
163 static unsigned int num_counter_active(struct gcov_info *info) in num_counter_active() argument
169 if (counter_active(info, i)) in num_counter_active()
179 void gcov_info_reset(struct gcov_info *info) in gcov_info_reset() argument
185 for (fi_idx = 0; fi_idx < info->n_functions; fi_idx++) { in gcov_info_reset()
186 ci_ptr = info->functions[fi_idx]->ctrs; in gcov_info_reset()
189 if (!counter_active(info, ct_idx)) in gcov_info_reset()
250 struct gcov_info *gcov_info_dup(struct gcov_info *info) in gcov_info_dup() argument
261 dup = kmemdup(info, sizeof(*dup), GFP_KERNEL); in gcov_info_dup()
269 dup->filename = kstrdup(info->filename, GFP_KERNEL); in gcov_info_dup()
273 dup->functions = kcalloc(info->n_functions, in gcov_info_dup()
278 active = num_counter_active(info); in gcov_info_dup()
282 for (fi_idx = 0; fi_idx < info->n_functions; fi_idx++) { in gcov_info_dup()
287 *(dup->functions[fi_idx]) = *(info->functions[fi_idx]); in gcov_info_dup()
289 sci_ptr = info->functions[fi_idx]->ctrs; in gcov_info_dup()
319 void gcov_info_free(struct gcov_info *info) in gcov_info_free() argument
326 if (!info->functions) in gcov_info_free()
329 active = num_counter_active(info); in gcov_info_free()
331 for (fi_idx = 0; fi_idx < info->n_functions; fi_idx++) { in gcov_info_free()
332 if (!info->functions[fi_idx]) in gcov_info_free()
335 ci_ptr = info->functions[fi_idx]->ctrs; in gcov_info_free()
340 kfree(info->functions[fi_idx]); in gcov_info_free()
344 kfree(info->functions); in gcov_info_free()
345 kfree(info->filename); in gcov_info_free()
346 kfree(info); in gcov_info_free()
359 struct gcov_info *info; member
421 static size_t convert_to_gcda(char *buffer, struct gcov_info *info) in convert_to_gcda() argument
432 pos += store_gcov_u32(buffer, pos, info->version); in convert_to_gcda()
433 pos += store_gcov_u32(buffer, pos, info->stamp); in convert_to_gcda()
435 for (fi_idx = 0; fi_idx < info->n_functions; fi_idx++) { in convert_to_gcda()
436 fi_ptr = info->functions[fi_idx]; in convert_to_gcda()
448 if (!counter_active(info, ct_idx)) in convert_to_gcda()
474 struct gcov_iterator *gcov_iter_new(struct gcov_info *info) in gcov_iter_new() argument
482 iter->info = info; in gcov_iter_new()
484 iter->size = convert_to_gcda(NULL, info); in gcov_iter_new()
489 convert_to_gcda(iter->buffer, info); in gcov_iter_new()
515 return iter->info; in gcov_iter_get_info()