[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] more profiling
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] more profiling |
Date: |
Sun, 17 Apr 2005 13:02:05 -0700 |
User-agent: |
Mutt/1.5.8i |
On Sun, Apr 17, 2005 at 09:31:27PM +0200, Sebastian Spaeth wrote:
> Now,a callgraph would be interesting, don't ask me how to get one though
Pass --callgraph=<number> to opcontrol. The number determines how
deep in the callgraph oprofile will save; higher is better but uses
more space. 8-10 should be fine to start, but probably worth
experimenting with.
Make sure to build debugging (or at least unstripped) versions of your
binary and your libraries. Don't use -fomit-frame-pointer. I used to
recommend installing -dbg versions of libraries if your system has
them (e.g., apt-get install libboost-dbg libc6-dbg), but now I'm
nervous that those aren't compiled with optimization, which will screw
up your profiles; probably best to build them by hand. (This whole
paragraph applies equally to callgraph and non-callgraph profiling,
actually.)
Run your program under the profile as usual (opcontrol --start and all
that).
Now opstack <path to binary> gives you lots of yummy data, that takes
a little squinting to start interpreting:
http://oprofile.sourceforge.net/doc/opstack.html
-- Nathaniel
--
The Universe may / Be as large as they say
But it wouldn't be missed / If it didn't exist.
-- Piet Hein