|
From: Vince W. <vi...@cs...> - 2007-04-05 03:45:26
|
> This is something I'd be interested in, if ever I get time to write a > tool I'd like to be able to look at allocated blocks (as returned by > malloc) and view the read/write ratio for each one, kind of like massif > but adding a "usage rate" weighting to the graph. I've posted the code for my other two valgrind plugins (all three can be found here http://www.csl.cornell.edu/~vince/software.html feel free to link to them from the valgrind pages) My cachetool plugin writes out a memory trace that has in it info for ever load/store (for data cache simulation), every basic block entered (for instruction cache simulation), and every memory allocation/free (because we were tracking heap object usage). It passes along extra info in the traces, such as PC for loads and stores. It also passes along the call-trace info for the allocs/stores because we were trying to uniquely identify malloc() call sites. All of this was intended to be used for doing Cache Conscious Data Placement. Unfortunately this project has been side tracked for now. I've posted the code to the aforementioned website if you want to look at it. I haven't tested it for a while. The trace files generated can be quite large, so usually I'd write the output to a named pipe (mkfifo) and then have the analysis tool run at the same time reading from it. Vince |