Hi When I launch callgrind with option --toggle-collect on a binary built from the source code below: valgrind --tool=callgrind "--toggle-collect=f1()" $BINARY I get the attached output file.
When it is opened with kcachegrind it looks like the Instruction Fetches ("Ir" column) is correct compared to a run without the --toggle-collect option (half the value without the --toggle-collect option). The "Count" column indicates one call to function f() but two calls to function g(), I would have expected only one call to g(). Is it something expected ? Thanks. source code: static void g() { ... } static void f() { g(); } static void f1() { f(); } static void f2() { f(); } int main() { f1(); f2(); }
callgrind.1
Description: Binary data
------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users