| View previous topic :: View next topic |
| Author |
Message |
urchin
Joined: 02 Jun 2005 Posts: 121
|
Posted: Tue May 09, 2006 9:56 am Post subject: Profiling with gprof |
|
|
Here's a quick sample showing how to add gprof support to your application, which allows your function calls to be profiled.
http://urch.in/gprof/gprof.zip
When "gprof_cleanup()" is called, gmon.out will be written to the current directory. This file can be analysed using the gprof application which is part of binutils. Note that you will need a version of gprof that has MIPS bfd support enabled (trying building with "--enable-libbfd --enable-targets=mips*-*-elf*"). Also note that the standard binutils configure file does not build gprof for some platforms even though it should build OK.
Tyranid is currently looking into patching binutils so that gprof is built as part of the toolchain. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Tue May 09, 2006 11:47 am Post subject: |
|
|
| I have updated the binutils patch, hopefully it will work for other platforms (only tested on x86 linux) |
|
| Back to top |
|
 |
|