Josef Weidendorfer, Thank you for your help with CALLGRIND_START_INSTRUMENTATION and CALLGRIND_STOP_INSTRUMENTATION. We are starting to use it now.Thank you again.
On Fri, Jun 3, 2011 at 11:00 AM, Josef Weidendorfer <josef.weidendor...@gmx.de> wrote: > On Friday 03 June 2011, Frank Chang wrote: >> At the beginning of a program period you want to profile, set the counters >> to zero (add "CALLGRIND_ZERO_STATS;" >> into your source), and at the end, dump the profile to a file (add >> "CALLGRIND_DUMP_STATS;" into your source code). >> >> >> However, we found found that that callgrind 3.6.1 on Centos Linux >> Version 5.5 x86_32 takes 10 times longer to run even in those parts of >> the program that are not be selectively profiled > > These macros do not influence whether simulation is done or not. > So, of course, the simulation is running all the time. > > Switching off/on simulation can be done via the macros > CALLGRIND_STOP_INSTRUMENTATION > and > CALLGRIND_START_INSTRUMENTATION > > There is an issue here: Switching instrumentation on will clean > the cache state, so there will be a lot of misses directly after > it, which would not happen in reality. > So in principle, you should switch on instrumentation some time > before zeroing counters for start of measurement. However, the > error usually is small even if you directly start measurement > when starting full instrumentation. > > Josef > ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users