Friday, August 31, 2007

Valgrind code coverage

To obtain code coverage on tests the only real option today is to use gcov. To use gcov you must you gcc and link in a libarary into everything that is executed which can be a pain. Rather than doing that, why not just either a) write a tiny valgrind module that outputs lines touched in a file and jumps taken or b) re-use callgrind's output and then combine that data with proper parser (of your specific language) to generate code coverage reports.

No comments: