On 07.01.2012 22:59, John Reiser wrote: >> However, after using callgrind_annotate --auto=yes, there is no information >> for a particular function, say, "foo". The name of "foo" in the assembly is >> "_Z10foo". I checked and evidence show that this function, which is the core >> computational part, should be executed, so there should be some stats >> for it. > Remember to insert ".type _Z10foo,@function" and ".size _Z10foo,.-_Z10foo" > into the source code.
Did this help? In any case, the cost should be attributed to some function, which probably just has the hex address of the entry as name. But you will miss the instruction-wise annotation. "callgrind_annotate" only can annotate source, ie. for assembly you have to compile the assembly as source, as you found out. However, this is not needed for the GUI kcachegrind. If you add "--dump-instr=yes" to callgrind, kcachegrind can show you annotated assembly (it's running objdump on its own on the binary or shared lib). If KDE is too heavy as dependence, you can compile qcachegrind from sources (see kcachegrind.sf.net), which only needs Qt4.x Josef ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users