|
Boost Users : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-07 05:13:52
Dave wrote:
> Hello All,
>
> I'm trying to profile Boost Graph examples using
> gprof, but can't get any reasonable results. My system
> is Mac OS X 10.3.9 and gcc version 3.3. I compile
> programs with -pg option, but the profile does not
> seem to contain any useful information. It only shows
> "no time accumulated", or 100% for main. What am I
> doing wrong?
For the record, I never managed to get gprof produce reasonably-looking
results for STL-intensive code. It usually reports that most time is spent
in vector::push_back, or something like that. With -pg, compiler inserts
extra code in every function, and for small once, that changes running time
quite a bit.
I suggest you try valgrind (http://valgrind.org), specifically, the
"callgrind" binary. Using GUI frontend, called "KCachegrind" is also highly
recommended. Note that for BGL, you *have* to build your binary with both
-g
and
-O3
options (optimization + debug symbols). -03 makes order of magnitude
difference.
- Volodya
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net