forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Profiling with gprof

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
urchin



Joined: 02 Jun 2005
Posts: 121

PostPosted: Tue May 09, 2006 9:56 am    Post subject: Profiling with gprof Reply with quote

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
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue May 09, 2006 11:47 am    Post subject: Reply with quote

I have updated the binutils patch, hopefully it will work for other platforms (only tested on x86 linux)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group