|
From: Ashley P. <as...@qu...> - 2007-04-04 15:26:32
|
Vince Weaver wrote: > The cache tool was part of a project I helped an MEng student do > for their research project. It just dumps raw memory and > instruction access traces to a pipe, and we had a cache-simuator > read from the pipe in a different process and did some cache > analysis. 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'd need a tool which dumped allocations (along with calling stack), deallocations and memory accesses, this could then be piped to a external process which would report: 1) Memory that is never written to or read from. 2) Memory that is written to but never read from. 3) Memory that is only used soon after creation and never again. 4) Invalid reads. 5) Reads from uninitialised memory. 4 & 5 are what effectively done by memcheck does anyway but would need to be handled by this tool The end result of this would be twofold, to help identify what may not technically be memory leaks but where memory usage increases over time and secondly to help developers reduce memory usage of applications by highlighting less frequently used memory regions. Ashley, |