|
From: Danny R. <dr...@cs...> - 2008-08-07 23:55:17
|
Anish Anto wrote: > Well, its understandable that running app using Valgrind has an > additional overhead - hence 600 secs CPU time with valgrind is compared > with 10 secs CPU time without valgrind. > However, my assumption was that the realtive percentage usage within the > functions should have remained the same , -eg 10% usage at function > FUN(), should have remained exactly 10% even on running valgrind, > however why does Valgrind/Kcachegrind show me as 33% ? There are no guarantees that the Valgrind generated code (even in the nullgrind case) have timings that match native, even relatively. In the case of cachegrind, the state of the cache also influences the amount of work the instrumentation does, and hence the amount of time taken. Eg, code which hits on the MRU line frequently does not need to check for hits against L2 or install lines. - Danny |