Callgrind: how to check if a string is executed or not
2 answers
Yes, you can. Using callgrind --collect-jumps = yes and the tools in the link below, you can get the same information as gcov. It's not as good as lcov, but the time savings can be well worth it.
http://benjamin-meyer.blogspot.com/2007/12/valgrind-callgrind-tools-part-3-code.html
Note that this works very well even with optimized binaries, so you save a ton of time in your build / test cycle by not recompiling with -coverage.
You can also combine multiple test runs before using the Benjamin script using cg_merge.
+1
a source to share