|
|
Like lprof(1), prof accepts -C as an option which causes it to generate C++ symbol names in their decoded form.
Using prof with overload2.C, the same program we used in
``Profiling C++ programs with lprof'',
a sample session to compile, run and obtain time profiling and call count information would be as follows:
$ CC -p -o overload2 overload2.C $ overload2in foo(void) in foo(int i), i = 1 in foo(const char *s), s = string..... in foo(const char *s), s = string.....
$ prof overload2
Object: overload2
%Time Seconds Cumsecs #Calls msec/call Name 0.0 0.00 0.00 1 0. main 0.0 0.00 0.00 2 0. foo__FPCc 0.0 0.00 0.00 1 0. foo__Fi 0.0 0.00 0.00 1 0. foo__Fv
$ prof -C overload2
Object: overload2
%Time Seconds Cumsecs #Calls msec/call Name 0.0 0.00 0.00 1 0. main 0.0 0.00 0.00 2 0. foo(const char*) 0.0 0.00 0.00 1 0. foo(int) 0.0 0.00 0.00 1 0. foo(void)