On Wed, 2013-08-21 at 11:12 +0400, Dmitry Antipov wrote: > I'm trying to use valgrind --tool=memcheck --trace-malloc=yes in attempt to > find inefficient memory allocations and optimize them out. It would be nice > to have an option to dump the backtrace for each malloc/realloc/free/etc. > call as well. Is there such an option? If not, is it possible to implement > something similar in the next version?
"inefficient memory allocation" : do you mean inefficient in cpu because a lot of malloc/free are done but memory usage is reasonable ? or do you mean inefficient because it uses a lot of memory ? (in this case: is it a temporary peak memory usage ? or is memory usage just growing/big ?) In both cases, you should be able to find the problem without backtraces : If the problem is cpu usage due to many malloc/free, callgrind should be able to point at the culprit(s). If the problem is peak memory usage, then massif should be able to point at the culprit(s). If the problem is just big/growing memory usage, then massif and/or memcheck should be able to point at the culprit(s). Philippe ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users