Gprof single function profile

Is it possible to use gprof for a linear profile for a single function in C ++?

Sort of:

gprof -l -F function_name ... 

which does not seem to work.

+4
source share
3 answers

This can be done easily with valgrind . This is a great tool if you have the opportunity to use it in your development environment. It even has a kcachegrind GUI .

+2
source

Try using parameters with [symspec] to filter the results. gprof 2.18.0 says that -F and -f are deprecated and use symspec instead.

In addition, -l may not work with binaries compiled with newer versions of gcc. Try gcov .

+1
source

Are you looking for a suspicious performance issue? If you have a biased opinion about where it is, this may not be the case. If you really want to find performance issues, you may first have to look beyond the myths perpetuated by gprof .

+1
source

All Articles