|
From: Josef W. <Jos...@gm...> - 2004-03-14 00:15:03
|
Am Thursday 11 March 2004 22:52 schrieb Jeremy Fitzhardinge: > On Thu, 2004-03-11 at 11:43, Chris AtLee wrote: > > Hi all, > > > > I started working on a code coverage skin for valgrind...Mostly as a > > learning project to see how valgrind works. A patch against current CVS > > can be found at: > > http://atlee.ca/coverage.patch.gz > > > > The skin is pretty stupid, it just records hits on instructions when it > > sees the INCEIP instruction. It also tries to do some conditional jump > > analysis. I've written a python script that will annotate source and > > show you what lines have been executed. Stupid question: Can't you use Cachegrind for this? > You might want to have a look at vgprof. I wrote it with the intention > of making Valgrind interoperate with gprof by generating gprof-format > files. Unfortunately, the gprof format is horrible and inextensible, so > the only way it can work is by hacking gprof itself, which isn't fun. So better use Cachegrind format? You will get source annotation for free (using cg_annotate or KCachegrind). I found the Cachegrind file format to be astonishing flexible to use for different purposes (in contrast to my own extensions .-). And it is quite space saving because of ASCII (!), too: No need to store 8 bytes for a 64 bit counter in a binary format, as most of the counters are small numbers. Josef > > Anyway, you might get some ideas from it: > http://www.goop.org/~jeremy/valgrind/12-vgprof.patch > http://www.goop.org/~jeremy/valgrind/vgprof.html > > J > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users |