This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GCC with gprof
- From: Brandon Heller <brandon dot heller at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 8 Jul 2005 15:28:44 -0500
- Subject: GCC with gprof
- References: <9230b3630507081326f04af7c@mail.gmail.com>
- Reply-to: Brandon Heller <brandon dot heller at gmail dot com>
I'm trying to use gprof to profile an application that is compiled
with GCC v3.4.3. I can compile the application and run it, but the
profile information lists all of two functions, with no time listed
for both of them. To get a better of idea of why this is happening,
I'd like to have gprof add basic-block counting to its profile by
using the -a switch as part of CFLAGS in the ./configure script.
One problem is that the -a option doesn't seem to be recognized. A
post to the gcc-help list implied that -a was deprecated around the
3.0 GCC release, but I couldn't confirm it, as the gprof site at
gnu.org indicated that it was available.
The other problem is that gprof's profile shows no useful info. It
could be the settings not getting passed in to the linker phase or
being put in only some files by the makefile script. Any ideas, and
are the any other recommended profilers out there?
Thanks for any help,
Brandon Heller