PSP Hardware Profiler

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

Moderators: cheriff, TyRaNiD

Post Reply
davidgf
Posts: 21
Joined: Mon Aug 31, 2009 10:05 pm

PSP Hardware Profiler

Post by davidgf »

Hi everybody!

I'm having a problem with the psp hardware profiler. If I call any of these functions:
pspDebugProfilerClear, pspDebugProfilerEnable, pspDebugProfilerDisable
The PSP crashes with some load/store exception.

I've put just a pspDebugProfilerClear which should'n give any problem (it just erases the counters) and it crashes!

Anyone knows why? Maybe I should call those functions in kernel mode or something like that?

Thanks in advance!

David
davidgf
Posts: 21
Joined: Mon Aug 31, 2009 10:05 pm

Post by davidgf »

Can anyone point to some app source which makes use of this at least?

Thanks again
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Yes those functions can only be used in kernel mode. If you are using psplink you can set user profiling mode (assuming it still works on new firmwares) by using the profmode command (use "profmode t" to set single thread mode, it will context switch the regs, or "profmode g" to set global mode). Then access the regs through sceKernelReferThreadProfiler or sceKernelReferGlobalProfiler functions respectively.
davidgf
Posts: 21
Joined: Mon Aug 31, 2009 10:05 pm

Post by davidgf »

Can I, instead of using psplink which gives me so much pain, create a prx module like exceptionHandler one with a wrapper for those functions?
Will this work?

Thanks for everything
David
Post Reply