Hi, Am 03.12.2012 00:28, schrieb Siddharth Nilakantan: > Curious question. How much is the slowdown of Callgrind over > Cachegrind?
Callgrind unfortunately is quite a bit slower than cachegrind. Reasons for this: (1) for dynamic call-graph collection, every basic block (BB) first calls into a Callgrind helper function to trace the sequence of basic blocks (ie. VEX's ability to merge multiple BBs is switched off). (2) there is some additional work in comparison to cachegrind as Callgrind collects separate counters of the same code if run within different threads or call-contexts. This often needs a lookup per executed BB in a dynamically growing hash table, to find the counter array to update. The actual slowdown will depend on the application, but I assume a factor of 2 or 3. Try it out yourself (note that cache simulation is by default switched off in Callgrind). > How does the slowdown change with larger programs? In general, all Valgrind tools get faster if the work on instrumentation goes down in the long run. But then, the slowdown between Cachegrind and Callgrind (given same cache simulation parameters), should be constant. Josef ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: BUILD Helping you discover the best ways to construct your parallel projects. http://goparallel.sourceforge.net _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users