geninfo iterates in the following loop over all files generated by gcov:
foreach $gcov_file (sort(@gcov_list))
($source, $object) = read_gcov_header($gcov_file);
$source = solve_relative_path($base_dir, $source);
It would be nice if geninfo would have an option to ignore $source that does not match certain file name pattern, i.e. if the next line would be something like
next unless matches_requested_filename_patterns($source)
This obvoiusly work similar quite to --extract option of lcov, but I belive it would result in a big performance improvement, as gcov tends to generate lots of useless (from our point of view) files containg coverage data for system or external library headers. Then geninfo reads all the files, and wastes time and processor cycles to generate huge info file, most of which will be removed by lcov --extract. For a big C++ project the whole process of generating unit test coverage data takes several hours. I hope using the proposed approach will reduce the time significantly.
The simillar thing can be done for reading gcno files for gathering initial coverage data.
I can try to create a patch, if you are interested in.
Thanks a lot,
Log in to post a comment.