Am 18.11.2012 06:40, schrieb Geoff Alexander: > I've recently been looking at Callgrind and Cachegrind output. I've > found that both tools generate an Ir count. From what I've found in the > Valgrind documentation and on the Web, the Ir count is the number of > instructions executed (instructions read). Thus, I would expect > Callgrind and Cachegrind to generate the same Ir count;
There can be slight changes from run to run, be it because of retried system calls (EAGAIN), signal handlers run at different times, and so on. As callgrind runs slower, this could make for different polling/retry behavior. But these should result only in slight changes, perhaps a few hundert. > however, I've > found that they give different values. Can some explain exactly what > the Callgrind and Cachegrind Ir counts are and why their values differ? If they differ by a larger amount, that seems to be a bug. Hmm. I think I just found a bug here :( Running callgrind without (default) vs. with simulation (--cache-sim=yes) gives different Ir counts. Analysing this in more detail using "--dump-instr=yes" to see the machine code annotation, Ir for calls to shared libraries differ by 1. And this goes away by switching off the smart PLT-ignore behavior (--skip-plt=no). Can you confirm this to be also be the case for the observed difference in your test runs? Some background: Callgrind has a mechanism where it can "ignore" given functions, by propagating costs and deeper calls to the call sites of that function. By ignoring dispatcher code, it makes the resulting call graph often much more useful. As code in PLT sections (jump tables to shared library functions, resolved by the runtime linker) are dispatchers, callgrind by default ignores them. This can be changed by "--skip-plt". Josef > I'm using the Valgrind 3.6.1 that comes with openSUSE 12.1 if that > make any difference. > > Thanks, > Geoff Alexander, Ph.D. > Software Engineer, Corporate Tools Development > IBM Corporation > RTP, NC > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > > > > _______________________________________________ > Valgrind-users mailing list > Valgrind-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/valgrind-users > ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users