> is it possible to detect all calls of some specific function in the code with 
> Callgrind?
>
> Let's say I have some project and I know, that there's function 
> SparseSolver() used several times and I need to know where specifically 
> (caller function/file + line number, so I'd be able to find calls in the 
> source code).
>
> Is it possible to find this out with Callgrind? I know about CScope, which 
> has this functionality 
> (http://stackoverflow.com/questions/36178082/use-cscope-to-find-function-calls-not-definitions-c-c),
>  but it's just for C and I need to look in C++ and Fortran too.

Why not use

        objdump --disassemble-all my_program.exe  |  grep SparseSolver

then 'addr2line'?  That way you don't require constructing the input data
that is required to exercise all the call paths, nor must you run the program
30 times slower than normal.  Of course, any method is unlikely to find
all the calls that have been inlined by the compiler or specialized+merged
using constant propagation and link-time optimization.
        

------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to