On Sat, 2007-06-30 at 12:45 +0200, Ewgenij Sokolovski wrote:
Hey, thanks a lot for your help! But why is impossible to profile BGL? As far as I know, normally all the standard libraries provide special compiled binaries, which are used for profiling when the -pg option is specified. Is it with boost not the case?
And as far as I have understood the gprof tutorial, if I profile some program, but forget to compile a function f with the -pg option, then nevertheless f will be presented in the profiler output, but there will be no real information about it. But the name should appear! Or have I missed something?
The problem is that the BGL data structures and algorithms use many small, inlined functions. These functions need to be inlined away for performance reasons, but that means that you don't get profiling information about them. If the compiler *did* put profiling information in them, it would be useless: the code of profiling these small routines exceeds the cost of the routines themselves, producing very misleading profiling information. - Doug