new psp profiling tutorial

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
zytek
Posts: 3
Joined: Thu Oct 25, 2007 9:04 pm
Location: Poland
Contact:

new psp profiling tutorial

Post by zytek »

Hello,
I've just finished a simple tutorial showing how to profile code on PSP, using both gprof and hardware profiler. Feel free to check it and comment.

This is my first such "publication" so please be tolerant.

http://zytek.nuxi.pl/psp/pspprofilingV1.pdf

I've msg oobles so he could put it into Tutorial section of ps2dev.org
zytek
snow
Posts: 31
Joined: Sat Dec 15, 2007 12:34 pm

Post by snow »

This is excellent, thanks. The more documentation the better. I needed info on profiling and this fits the bill.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Nice,

One thing though you might be interested in, if you are running psplinkusb you can use the command profmode with either g or t option to specify global or thread profiler. In that mode you can access the profiler registers from user mode, no need to ever be in kernel mode to do it and as a bonus if you set thread mode it will actually context switch the registers so you only get a count of what that thread is doing.

Once you have enabled either mode (and done a psplink reset) then in your code you can call sceKernelReferThreadProfiler or sceKernelReferGlobalProfiler to get a pointer to the registers.
User avatar
zytek
Posts: 3
Joined: Thu Oct 25, 2007 9:04 pm
Location: Poland
Contact:

Post by zytek »

Thanks for feedback, I really appreciate it.

TyRaNiD thanks, I must take a closer look at it and update this tutorial afterwards.
zytek
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Thanks zytek,
Very neat.
One question, could you possibly make this available as a plain text file.
Love the PDF, but when I have the most time to read, I only have a PSP.

Thanks TyRaNiDe (pronounced like cyanide),
How big you can hack a very small machine! ;)

Now I've finally go to try psplink again.
A lot of the time I'm using the serial port myself,
but I've underestimated it's advantage.
Art.
If not actually, then potentially.
Decinoge
Posts: 4
Joined: Mon Nov 12, 2007 11:28 am

Post by Decinoge »

Thanks.

This was a great tutorial and it will become very helpful in the future.
I am simple new coder (coding C++ for less than 6 months) and i understood it perfectly (on the extend of my interest and my need).

Keep up the good work and be proud of this tutorial.
none
Post Reply