Related articles |
---|
C++ runtime profiling emailamit@gmail.com (Amit Gupta) (2007-06-22) |
Re: C++ runtime profiling dmaze@mit.edu (David Z Maze) (2007-06-25) |
Re: C++ runtime profiling rsc@swtch.com (Russ Cox) (2007-06-25) |
Re: C++ runtime profiling reganrussell@optusnet.com.au (regan) (2007-09-04) |
C++ runtime profiling mikedunlavey44@gmail.com (Michael Dunlavey) (2012-01-13) |
From: | David Z Maze <dmaze@mit.edu> |
Newsgroups: | comp.compilers |
Date: | Mon, 25 Jun 2007 11:24:55 -0400 |
Organization: | Massachusetts Institute of Technology |
References: | 07-06-058 |
Keywords: | C++, testing |
Posted-Date: | 25 Jun 2007 11:30:10 EDT |
Amit Gupta <emailamit@gmail.com> writes:
> I wonder if there are other good open-source runtime profilers for C+
> +. My minimal knowledge indicates either gprof and to some extent
> cachegrind (little different). What other tools are out there? Is
> gprof the best out there for free profilers? Please, open-source and
> free tools are important keywords in my message.
oprofile [1] is a very useful whole-system profiling tool, particularly
if you're using 32-bit x86 Linux. It can identify which processes are
using the most CPU cycles, and can drill down as far as individual
instructions. You can also set it to look for specific other things
(e.g. branch mispredicts). The upside is that you can run unmodified
code under it; the major downsides are requiring Linux kernel support
and not being able to gather exact call-profile statistics (gprof I
belive logs every call in addition to taking periodic samples).
You mention cachegrind; I wouldn't even attempt to use any of the
greater valgrind tool suite for any sort of performance testing, since
it works by emulating the entire machine with hooks for plug-ins to do
extra work, most frequently checking that memory accesses refer to
initialized memory. If you're sure that cache misses are your
performance problem it might be helpful, but I don't know how you'd
determine that without starting with a broader profiler.
[1] http://oprofile.sourceforge.net/
--dzm
Return to the
comp.compilers page.
Search the
comp.compilers archives again.