> 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.

What does the symbol table entry for _Z10foo say?
--- foo.S
foo:    .globl foo
        movl $5,%eax
        ret

bar:    .globl bar
        .type bar,@function
        movl $7,%eax
        ret
        .size bar,.-bar
---
$ gcc -c foo.S
$ readelf --symbols foo.o  # readelf is in the binutils package
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     4: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 foo
     5: 0000000000000006     6 FUNC    GLOBAL DEFAULT    1 bar
---
valgrind tools will ignore 'foo', but 'bar' will be measured.
Remember to insert ".type _Z10foo,@function" and ".size _Z10foo,.-_Z10foo"
into the source code.

-- 

------------------------------------------------------------------------------
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

Reply via email to