|
From: Nicholas N. <nj...@cs...> - 2005-03-24 14:57:16
|
On Wed, 23 Mar 2005, Jeremy Fitzhardinge wrote: >> Has anyone considered adding a coverage tool to valgrind? It seems that >> it would be able to do this well. >> >> Also, how about a source level profiler (gprof replacement)? >> >> Has any work ever gone into researching these ideas? >> >> If this has been brought up before, and it was decided that these tools >> would not fit well into valgrind, please let me know. > > I wrote a tool called "vgprof", which produced gprof-compatible(ish) > output. Unfortunately it has sadly aged. I've made a start as > resurrecting it, but it isn't there yet. One of the problems is that > the gprof file format is pretty broken, and its unclear that it is the > best to use; oprofile might be a better bet. As for coverage, Cachegrind can give you a crude form of coverage information, but it doesn't give percentage coverage. I believe Ben Elliston was looking at writing a coverage tool with Valgrind that would produce gcov-compatible output files. AIUI, one of the difficulties is that gcov output is done on a basic block basis, and Valgrind's notion of a basic block is subtly different from that of a compiler's. The Valgrind 3.0 series will use the new dynamic binary translator Vex, which translates multiple basic blocks at a time; this may make things trickier again. N |